I have a customer who wanted to define a role based UI for its Sales, Marketing and Services departments. The role based SiteMap configuration rather not been possible with Dynamics CRM 2013’s standard product features. In this post, I would discuss how this requirement can be achieved inside CRM 2013.
Before we begin, here is a quick recap of the problem statement. We need to define a SiteMap based of the following matrix:
The Dynamics CRM Security Roles does help us in setting up separate security privileges on the data that is viewed by various Job profile. While Security Role has some control on the navigation elements like if a Security Role does not provide any access to an entity, the entity navigation does not appear in the UI; however Security Roles do not fully control the SiteMap Navigation elements like the SiteMap Areas of Sales, Marketing, Services, Help and Settings.
Here we would discuss the solution for the problem.
- Create one entity for each area in the SiteMap, like:
While creating these entities do not to select any options as shown below:
- Create the following Security Roles:
- Sales Section Accessor
- Marketing Section Accessor
- Services Section Accessor
- Settings Section Accessor
- Help Section Accessor
For each of these security roles, only configure access rights for the custom entities created in Step 1. Leave the rest of the configuration empty.
Below is shown how Sales Section Accessor security role would be configured:
- Next step is to customize the SiteMap. The best tool to get this done is the XrmToolbox. Download the tool and install it. Then connect to the CRM instance and launch the Site Map Editor. Next step would be to Load the SiteMap.
- Then expand the Area (SFA) section. Then modify the Privilege for each SubArea to the SalesSiteMap entity as shown below:
- Now expand the Area (CS) section. Then modify the Privilege for each SubArea to the ServicesSiteMap entity.
- Expand the Area (MA) section. Then modify the Privilege for each SubArea to the MarketingSiteMap entity.
- Expand the Area (Settings) section. Then modify the Privilege for each SubArea to the SettingsSiteMap entity.
- Finally expand the Area (HLP) section. Then modify the Privilege for each SubArea to the HelpSiteMap entity.
- After modifying the SiteMap, Save the SiteMap using Save SiteMap button.
- Now provide the security roles to the users as per the following matrix:
Now when the user logs-in to the system they would see only the sections defined in the problem statement here.