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

Dominic Jarvis, 16 October 2017

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<GUID>%7D/img_name.png”. This was breaking the links, causing the images to be unable to be displayed in CRM Site Map.

image

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/<ResourceSchemaName>.png”, and the images are now correctly displayed as expected.

image

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.