Hiding the out-of-the-box buttons “Excel Templates” and “Word Templates” is a usual requirement in many Dynamics 365 Customer Engagement projects. These buttons are, by default, in all entities and ribbons.
What is the quickest and cleanest way to hide them? Security Roles.
If you don’t need the document functionality or the documents are generated by only particular users, you can remove the following permissions from the rest of your security roles and that will make disappear these buttons for the corresponding users. In the Security Role, go to the “Business Management” tab:
- Remove “Document Template” privileges.
- Remove “Personal Document Template” privileges
- Remove “Document Generation” privileges
If your scenario is more complex and you need these privileges, but you still want to hide these buttons, you will need to customise the ribbon. This article from Scott Durow explains it pretty well: https://ribbonworkbench.uservoice.com/knowledgebase/articles/76681-hide-a-standard-out-of-the-box-button-based-on-a
For instance, let’s say that we want users to see these buttons only when they have permissions to create a Document Template:
Using Ribbon Workbench, we are going to add a new Display Rule to add this condition:
In this example, I have customised the Form ribbon in the Application Ribbon, so this will apply to all entity forms. But you could choose a particular entity if you needed to.
Once I have applied that rule, see what will happen in the opportunity ribbon: