Bhoopathi

"Be Somebody Nobody Thought You could Be"

Friday, January 27

Buttons - Display Rules Based on Security Roles for Users

The steps outlined below require no coding and can be easily implemented utilizing the Ribbon Workbench and out-of-the-box security roles. To accomplish this, we created a custom entity (po_Security) to manage the display rules, however, this is not required as the exiting entities and privileges can be used. We created the new entity to ensure that no existing entity privileges were going to be effected, but the same principles will apply regardless if you chose to create a new entity or not.
1. First, start by downloading and installing the Ribbon Workbench.
2. In CRM, create a new solution that will contain only the entities you wish to update the button display rules for.
3. Next, launch the Ribbon Workbench from the Solutions section in Settings.
Security Roles in CRM
4. In the Ribbon Workbench, select a solution to open. We’ll select the solution that we created for the purposes of our button display rule edits.
Security Roles in CRM
5. When the solution loads in the Ribbon Workbench, select the entity to start with.
Security Roles in CRM
6. In this example, we will be removing the ability for certain users to create and add existing Leads from a sub grid on the Account entity as well as the ability to delete or remove Lead records from the grid. Select the first button to create and apply a display rule to. Right click on button and select Customize Command.
Security Roles in CRM
7. Navigate to Commands in the Solution Elements tab.
Security Roles in CRM
8. Right click on the Command and click Edit Display Rules (or select the lookup on the Display Rules field as shown on the right).
Security Roles in CRM
9. Select +Add New in the display rules viewer.
Security Roles in CRM
10. Select Add Step.
Security Roles in CRM
11. Select Entity Privilege Rule and then click OK.
Security Roles in CRM
12. Create the New Display Rule:
  • Make sure to update the ID (the name of the rule) as the default name is generic and difficult to keep track of if you have multiple rules. Use a name that will help differentiate the purpose of the rule and allow you to identify it easily.
  • AppliesTo – choses selected entity. This refers to the value input into the EntityName field.
  • EntityName – enter the schema name of the entity.
  • PrivilegeDepth – choose the appropriate level of the privilege you are using to control the display functionality of the button. In this example, we are using the Global privilege level for the created permission of the custom po_security entity created previously.
  • PrivilegeType – select the privilege type (create).
Security Roles in CRM
13. Next, select OK and the Display Rule will be added to the Command. Select OK again on the Display Rules viewer to enable the rule.
14. To apply the same rule to additional buttons, select the next button you wish to add the Display Rule to. Right click and select Customize Command.
Security Roles in CRM
15. Navigate to the Command section and select the command to customize. Right click and choose Edit Display Rules.
Security Roles in CRM
16. Select the previously created rule and click Add > to button commands. Then click OK.
Security Roles in CRM
17. Repeat these steps for all required buttons. In our example, notice all of the buttons required to be hidden in order to achieve the desired functionality.
Security Roles in CRM
18. Now that the Display Rules are applied to the necessary buttons, notice that we no longer have the ability to add a new Lead from the sub grid.
Security Roles in CRM
With a basic understanding of how Display Rules work and how to utilize out-of-the-box security roles, you can provide more flexibility to how users perform specific functions in CRM.
Want to learn more about Dynamics CRM? Did you know that we have an entire library of Webinars on Demand? Watch and learn more about CRM anywhere, anytime! Make sure you sign up for our event notifications as well, so you can be notified about any new and upcoming webinars!
Happy CRM’ing!