Sunday, July 11, 2010

Sorting Dynamics CRM Left Navigation

In CRM 4, when you enable a custom entity to be displayed in a navigation area, they are displayed in the order they were added. We had a requirement to sort the entities so that they can be found easily. The way to achieve this is to edit the SiteMap.xml and re-upload back into the site. This can be very tedious if you have a considerable amount of custom entities.

I wrote an XSLT file which automates the sorting process. Hey, if you gotta do something more than two times, might as well automate it.

A few things to note when using this approach:
  • The sort can only be performed against the internal names of the entities as the SiteMap.xml does not contain the display names.
  • As new entities are added to areas, this script will have to be re-run.
  • This solution does not sort the left navigation within the Forms.


Please let me know your thoughts in the comments.

Sources

Configure the Site Map to Customize Application Navigation in Microsoft Dynamics CRM 4.0
http://msdn.microsoft.com/en-us/library/dd393294.aspx

SiteMap XML Reference
http://msdn.microsoft.com/en-us/library/cc150883.aspx

Friday, July 09, 2010

Clear SQL Server Cache and Stored Procedure Cache

To clear SQL Server’s cache, run DBCC DROPCLEANBUFFERS, which clears all data from the cache. Then run DBCC FREEPROCCACHE, which clears the stored procedure cache.

I never seem to have this info handy when I actually need to use it. Posting here for easy reference.

Source:
http://www.devx.com/tips/Tip/14401