web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / D365 Demystified / Show Ribbon button only on ...

Show Ribbon button only on record selection in Dynamics CRM

Priyesh Profile Picture Priyesh 7,396 User Group Leader

Syndicated from - https://d365demystified.com/2020/03/06/show-ribbon-button-only-on-record-selection-in-dynamics-crm/

One of the most common asks is to show ribbon buttons to only be shown when at least 1 record in Dynamics 365 ribbon button are selected.
buttonShow

Here’s how you can do it –

Enable Rule in Ribbon Workbench

This can be achieved using Enable Rule for the button you wish to show on selection using Ribbon Workbench.

Let’s say your button ‘Promote’ (in this case) is on the Main View of the Account entity. You can add the following Enable Rule to the command –
enableRuleBound

And in the actual Enable Rule, you can select the SelectionCountRule to make this happen. You can set the minimum value to 1 so that it appears when at least 1 record is selected.
acutalEnableRule

Result

Now, if you see – By default, the button is hidden –
buttonHidden

Now, as you can see, only when at least 1 record from the view is selected, the button is visible.
buttonShow

Hope this helps!!


This was originally posted here.

Comments

*This post is locked for comments