HOW To hide items from “Settings” menu
In some cases it is necessary to hide some items from the side menu according to the CRM user’s assigned role. To do this we need to modify the SiteMap from the CRM.
The example given in this post is done on CRM 2011 but it also applies to CRM 4.
We are going to see:
· How to hide items from the Settings section.
· How to hide the whole Settings area.
Firstly, we are going to export the CRM SiteMap as follows:
Go to Settings > Solutions >
Create a new solution.
Complete data.
In the “Add Existing” menu we select “SiteMap” option and then “Save and Close”.
Once we create the solution we select and export it, by clicking the “Export” button.
Click “Next”
Select “Customizations”
Mark the “Unmaneged” choice. Click “Export” and save the file .zip.
When extracting the zip we find the customizations.xml file which contains the customizations from our CRM, just the ones from the “SiteMap” in this case.
Inside the <SiteMap> node is the complete structure from the side menu.
The privilege level the user has over the entity assigned to the menu item means what is going to determine it to be shown for some users but not for others.
Example:
In this case only those roles having the “Read” permission over the “Solution” entity will be able to see this menu item. This compels us to attach a role to an entity in order to determine if the menu item is visible or not.
So we have two options: to create an entity just to define the visibility of the menu item, or to use an already created entity not working with it in our solution, for example “Solution”.
To determine which permissions has a role over an entity we go to Settings > Administration > Security Roles
In the role properties window we can assign or remove the permissions over the entities. In this case we remove the “Read” permission from the “Solution” entity.
In this example the users of the role “User” won’t have the “Business Management” option visible inside the “Settings” menu.
Keep in mind the privileges are set over the <SubArea> nodes, if it necessary to hide the “Settings” menu we need to hide all the <SubArea> nodes.