5 - Hiding/UnHiding Ribbon Elements

I've always found that too many options presented to a user will be just as damaging to their experience as too-little. The CRM 2011 ribbon allows you to hide ribbon elements using two approaches:

  • Global Hide Actions - Elements are hidden globally at all times.
  • Dynamic Display Rules  - Elements are made visible dependent on particular conditions that are specific to the current record or the user logged in. Dynamic Enable Rules go hand-in-hand with Display Rules.

Global Hide Actions

Clearly it is important to decide which option to use, but often the quickest and most effective way of clearing up the user interface is through 'Hide Actions'

1) Find the Tab or Button you would like to hide - some buttons may exist on more than one Ribbon - Form, Home Page and SubGrid - so make sure you have the correct one using the drop down in the top right of the design surface.

2) Use the 'Right Click' -> 'Hide'

3) Once you have hidden an item, you will see a red strike-through:

Hiding Groups

If you want to hide an entire Group, then you simply need to hide each button within it, and the Group will not be rendered. The Ribbon Xml schema actually allows you to apply Hide Actions to groups, however I've found that this can cause JavaScript errors in the UI and so it is worth avoiding.

Dude, where's my Button?...UnHiding a Tab or Button

Once you've hidden a Button or Tab and published and re-loaded, it will no longer appear in the Ribbon Workbench Design Surface. When you re-load the solution, you'll see a message indicating that there is a Hide Action, and the element is not visible until you delete the Hide Action and re-load the solution.

To un-hide a ribbon element, you can select the corresponding Hide Action in the Solution Elements -> Hide Actions, and use the left-click menu 'UnHide':

Custom Elements that are also hidden

If you try and hide an element that is already customised in some way (e.g. a Tab that has a custom button/group) the Ribbon Workbench will give you an message similar to the following:

This is because the Tab, once hidden, will no-longer appear in the Ribbon Workbench, and you will not be able to access your customisations. If you've already hidden a customised tab by manually editing the xml, you will receive a message when loading the solution indicating as such. In this scenario you should be warned that publishing the customisations will remove you customisations and leave only the hide action.

Dynamic Display Rules

Before Dynamics CRM 2011 renders a button, it first checks the Command for any Display Rules. This contain sets of rules that are evaluated every time the ribbon is displayed (or refreshed).

More content coming soon...

Feedback and Knowledge Base