Microsoft Dynamics CRM 4.0 - Thought Repository

Thursday, December 10, 2009

Edit the Sitemap to Hide Navigation Tabs from Certain Users


Users of a CRM system can be spread across different departments and organizations. How can you control the navigation tabs on Microsoft CRM 4.0 so that the customer service department and marketing department only see the parts of CRM that they use? While there is no interface within the Settings navigation console to control this, you can hide tabs from groups of users by modifying the sitemap and security roles. If you are unfamiliar with modifying the sitemap, reading Micorsoft Sitemap Reference and article on modifying the CRM Sitemap will be helpful.

The sitemap is comprised of the xml tags Area, Group and SubArea which show up in the CRM as shown below.

For this example, I’ll go through the steps to hide the “Marketing” tab from customer service users. I’ll pretend that the Marketing tab consists of only the Account, Contact, and Leads entities and customer service does not have “read” access to Leads. You can remove the read access for users in Marketing by creating a security role called Marketing and removing the read permission as shown.

Next we export the sitemap and locate the section that corresponds to the Marketing Area. It looks something like this:
<Area Id="MA" ResourceId="Area_Marketing" Icon="/_imgs/marketing_24x24.gif" DescriptionResourceId="Marketing_Description" Title="Marketing">
   <Group Id="MA">
     <SubArea Id="nav_accts" Entity="account" DescriptionResourceId="Account_SubArea_Description" />
     <SubArea Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description" />
     <SubArea Id="nav_leads" Entity="lead" DescriptionResourceId="Lead_SubArea_Description" />  
   </Group>
 </Area>
We’ll want to split the Lead SubArea into its own group. This is due to the CRM sitemap rule that if a user that does not have privileges to all the SubArea’s within a Group, then the whole Area is hidden from the user. This is accomplished by adding a Privilege tag within our Lead SubArea. Splitting off Lead into a new Group will have no visible impact on the CRM. Newly created Groups that do not have a “Title” attribute will look exactly the same as if they were in the same Group. The modified code that will help us achieve this.
   <Area Id="MA" ResourceId="Area_Marketing" Icon="/_imgs/marketing_24x24.gif" DescriptionResourceId="Marketing_Description" Title="Account Management">
     <Group Id="MA">
       <SubArea Id="nav_accts" Entity="account" DescriptionResourceId="Account_SubArea_Description" />
       <SubArea Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description" />
     </Group>
     <Group Id="LEAD">  
       <SubArea Id="nav_leads" Entity="lead" DescriptionResourceId="Lead_SubArea_Description">  
 <Privilege Entity="lead" Privilege="Read" />
       </SubArea>
     </Group>  
   </Area>
Before uploading your modified sitemap back to your CRM, make sure you have a copy of the exiting sitemap as a backup in case anything goes wrong. After uploading the new sitemap, you can test it out by using Internet Explorer to impersonate another user. Once you have this simple example working, you can move on to creating entirely new custom tabs for the different departments in your organization.
Continue Entry»

View Comments

About Me

Henry Bow
I'm a programmer living in sunny Orange Country, California. Since the beginning of 2008, I've been developing on the MS Dynamics CRM 4.0 platform. This blog will help me jot down some of the tips and neat features I've developed along the way while giving me a chance to dabble into the curious world of analytics and SEO.

Please let me know if I can help with your CRM needs.
hbow27@gmail.com

Feed Rss

Subscribe to new posts via e-mail

Recent Posts