locked
Dynamically Change Lookup and Grid Icons---Academic Question RRS feed

  • Question

  • Hello,

    This question is similiar to this one only I would like for it to be done on a lookup field as opposed to a grid although that would be nice too.

    http://social.microsoft.com/Forums/en-US/5a55ddc4-5d2f-40ef-b171-15e35e2393af/how-to-change-icons-in-grid-dynamically?forum=crmdevelopment

    The jist of the question is that in lookup fields, sub-grids, etc. when there is a list of records we see the icon of the entity. I would like to be able to dynamically change that icon. I am OK with developing custom code.

    Would you do as above and write client-side?

    I was wondering about a more robust method. Perhaps intercepting the lookup object and replacing the icon property value. But what if that property is sealed? Then you are back to client side?

    Perhaps I could create my own lookup object that is used instead the default one.

    So I guess my first question would be what exactly are the steps / processes CRM is going through when it populates a Lookup field?

    Again I understand this might not be supported. I am just speaking academically / playing in my sandbox.

    Thank You



    • Edited by zzpluralza Monday, January 13, 2014 9:50 PM
    Monday, January 13, 2014 9:49 PM

All replies

  • The best way I can think of is to write an HTTP Handler that would intercept the native icon request and change it. 

    http://codeluck.blogspot.com/2007/07/using-http-handler-for-dynamic-image.html

    I don't think you can use a plugin so the only other way I can think of is to build custom grids and lookups.


    Blake Scarlavai - http://mscrmdev.blogspot.com/ - Sonoma Partners - http://www.sonomapartners.com/ - Follow @bscarlav
    CRM 2011 JavaScript Model Generator - CRM 2011 Appender for log4net

    Tuesday, January 14, 2014 5:43 AM
  • Interesting thought....I wonder that would run under the security account iis is configured with no? If I called the odata service to get some record information to know icon to use etc. I would have to first authenticate...so crm would have to have said account...this sounds just like the "it can't be done" challenge I like to tackle for the fun of it...yes I'm a masochist.
    Tuesday, January 14, 2014 5:59 AM