locked
Where Are Icons Stored RRS feed

  • Question

  • I have some custom icons for entities in CRM4. However, I don't have the original icons anyore. Are they stored as individual files somewhere on the deployment server where they are easily accessible?
    Thursday, August 4, 2011 9:48 PM

Answers

  •  

    Just want to add my suggestions. You can write a console application and read that specific field and convert encoded string and write back to a file at disk. 

    All the custom entities in crm store the icons inside gridicon, outlookshortcuticon and largeentityicon attributes or organizationui entity, the built-in entity icons are stored inside the /_imgs/ folder with the format of /_imgs/ico_16_xxxx.gif (gridicon), with xxxx being the entity type code.

    Following code will fetch all icons related to entities:

     

    RetrieveMultipleRequest request = new RetrieveMultipleRequest
    {
      Query = new QueryExpression
      {
        EntityName = "organizationui",
        ColumnSet = new ColumnSet(new[] { "objecttypecode", "formxml", "gridicon" }),
      }
    };
     
    var response = sdk.Execute(request) as RetrieveMultipleResponse;

    In following code i am encoding a file to base64 and you can use it in reverse order and use decode rather encode.
    Byte[] data;
    
    ASCIIEncoding encode = new ASCIIEncoding();
    data = encode.GetBytes(str.ToString());
    
    string b64 = Convert.ToBase64String(data);

    Here is a way to find icons through SDK

    We often use this technique to export plugins written by a different vendor. My friend mitch has also created a utlility for exporting plugins http://blogs.infinite-x.net/2011/06/27/free-utility-released-export-crm-4-0-plugins/

     

    Hope this helps,


    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Thursday, August 4, 2011 11:40 PM
    Moderator
  • I don't see any license bypass issue when using this tool. Plugin assemblies are still binary code[DLL]. They are packed in your solution file too.
    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Friday, August 5, 2011 5:57 AM
    Moderator
  • Moreover, i have used this tool to extract an older version of plugin assembly.
    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Friday, August 5, 2011 5:59 AM
    Moderator

All replies

  • Hi,

    CRM stores custom entity icons into the database in Base 64 Encoded string format, when you will export the entity then in the Customizations.Xml file you can see the icon encoded string value. Whenwever you will update the entit icon then exsiting entity icon will be overwritten. To change the entity icon you may following instruction at the following link: http://crmdm.blogspot.com/2011/03/how-to-change-define-icons-of-custom.html

    CRM system entity icons are stored in <CRM Web DIr>\_imgs directory.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Thursday, August 4, 2011 10:30 PM
  •  

    Just want to add my suggestions. You can write a console application and read that specific field and convert encoded string and write back to a file at disk. 

    All the custom entities in crm store the icons inside gridicon, outlookshortcuticon and largeentityicon attributes or organizationui entity, the built-in entity icons are stored inside the /_imgs/ folder with the format of /_imgs/ico_16_xxxx.gif (gridicon), with xxxx being the entity type code.

    Following code will fetch all icons related to entities:

     

    RetrieveMultipleRequest request = new RetrieveMultipleRequest
    {
      Query = new QueryExpression
      {
        EntityName = "organizationui",
        ColumnSet = new ColumnSet(new[] { "objecttypecode", "formxml", "gridicon" }),
      }
    };
     
    var response = sdk.Execute(request) as RetrieveMultipleResponse;

    In following code i am encoding a file to base64 and you can use it in reverse order and use decode rather encode.
    Byte[] data;
    
    ASCIIEncoding encode = new ASCIIEncoding();
    data = encode.GetBytes(str.ToString());
    
    string b64 = Convert.ToBase64String(data);

    Here is a way to find icons through SDK

    We often use this technique to export plugins written by a different vendor. My friend mitch has also created a utlility for exporting plugins http://blogs.infinite-x.net/2011/06/27/free-utility-released-export-crm-4-0-plugins/

     

    Hope this helps,


    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Thursday, August 4, 2011 11:40 PM
    Moderator
  • I was hoping there is an easier way but it doesn't look like. Thanks for the answers, though. Btw, this tool to extract plugins does not circumvent licenses for the solution, correct? If it does then how can you prevent that somebody can circumvent licensing by doing this?
    Friday, August 5, 2011 5:18 AM
  • I don't see any license bypass issue when using this tool. Plugin assemblies are still binary code[DLL]. They are packed in your solution file too.
    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Friday, August 5, 2011 5:57 AM
    Moderator
  • Moreover, i have used this tool to extract an older version of plugin assembly.
    Ayaz Ahmad CRM Architect | http://ayazahmad.wordpress.com
    Friday, August 5, 2011 5:59 AM
    Moderator