Friday, 13 December 2013

Crm 2013 – Script errors after upgrading an ex-Crm 4.0 organisation


After a recent upgrade to Crm 2013 of an organisation that had been a Crm 4.0 organisation, there were client script errors when navigating to the Case or Queue entities. The underlying cause was some SiteMap entries that referenced Crm 4.0 urls; these were being redirected to new urls, but seemed to be missing some elements on the QueryString.
The SiteMap entries with issues were:

<SubArea Id="nav_cases" Entity="incident" DescriptionResourceId="Cases_SubArea_Description" Url="/CS/home_cases.aspx" />
<SubArea Id="nav_queues" Entity="queue" Url="/workplace/home_workplace.aspx" DescriptionResourceId="Queues_SubArea_Description">
  <Privilege Entity="activitypointer" Privilege="Read" />
</SubArea>

The fix is to replace them with the following (which come from a default SiteMap in a new Crm 2013 organisation, though I’ve stripped out the GetStarted attributes):

<SubArea Id="nav_cases" DescriptionResourceId="Cases_SubArea_Description" Entity="incident" />
<SubArea Id="nav_queues" ResourceId="Homepage_Queues" DescriptionResourceId="Queues_SubArea_Description" Icon="/_imgs/ico_18_2020.gif" Url="/_root/homepage.aspx?etc=2029" >
 <Privilege Entity="queue" Privilege="Read" />
</SubArea>

These are the only entries I’ve found so far with problems. I think the entry for Queues is a one-off, but the entry for cases is notable in that the original (Crm 4.0) SiteMap entry included a Url attribute, whereas entries for most other entities did not include the Url attribute. So, it’s possible that other entries that include both the Entity and Url attribute could have the same issue.
Although annoying at the time, I don’t see this as a major issue, as reviewing the SiteMap will be one of the standard tasks we do for any upgrades to Crm 2013. This is due to change in navigation layout, which means the overall navigation structure deserves a rethink to make best use of the new layout. When doing this, we find it is best to start with a new clean SiteMap and edit this to a customer-specific structure for Crm 2013, rather than trying to edit an existing structure. It’s also worth noting that a few of the default permissions have changed (spot the difference above for the privilege to see the Queues SubArea), and it’s worth paying attention to these at upgrade time for future consistency.


2 comments:

Michael Harmer said...

It is wonderful to know we are to alone in this one. We upgraded to CRM 2013 from CRM 4.0 via CRM 2011 in one night. And sure enough, Cases and Queues were broken. We had no idea why as we were not really familiar with SiteMap at all. However, as we were a plain CRM 4.0 with no modifications we decided to try just loading the default sitemap from the SDK and it did fix the problem for us. We then went back and re-added the custom entities we had created. This also fixed a lot of the configuration setting for Cases and Queues as they were originally set to not be available on mobile devices.

Evincible Solutions said...

This article was very helpful in answering alot of questions about Microsoft Dynamics CRM. I will be looking forward to such companies like Evincible Solutions. Thanks for posting.