How to Solve Site Map images not showing On Premise Dynamics CRM Issue

Recently, I have encountered an error which prevented the custom Site Map icons from being shown in Microsoft Dynamics CRM, instead showing a broken link. Looking into the issue, I found that the image URL displayed in the CRM Site Map was including the Organisation name in the link, so the link was something similar to “/OrgName/%7B%7D/img_name.png”. This was breaking the links, causing the images to be unable to be displayed in CRM Site Map.

image thumb How to Solve Site Map images not showing On Premise Dynamics CRM Issue

Initially, in the Site Map XML, these links were set using the dynamic Web Resource URL: $ webresource as per the Microsoft spec (found here: https://msdn.microsoft.com/en-us/library/gg309473.aspx), as creating the references in this fashion establishes dependencies. Unfortunately, creating the references in this fashion causes the error specified above. In order to circumvent that, the images had to have their location hardcoded similar to how Microsoft’s OOTB Area and SubArea custom icons are, by using an absolute path.

After changing the path, it now looks like this:

“/WebResources/.png”, and the images are now correctly displayed as expected.

image thumb 1 How to Solve Site Map images not showing On Premise Dynamics CRM Issue

While this is not an ideal solution due to the lack of dependencies created – meaning that images used in the Site Map can be deleted, this was the most workable solution to the issue encountered.

Let’s block ads! (Why?)

Magnetism Solutions Dynamics CRM Blog