In this blog, we will learn how to handle the visibility of RibbonButton based on selection of records.
To achieve this, we need to have a XRM toolbox setup in your computer and connected to your working CRM Environment.
Most of the customers wanted to have a custom RibbonButton on a particular entity and due to this visibility of that RibbonButton comes in a picture that improves the efficiency of the product.
We can handle button visibility from Entity form, Entity List view and from any Subgrid on entity from.
Here in this blog we will cover the visibility of custom button from Home grid.
We have requirement where there is a Custom RibbonButton on SubGrid and on Homepage Grid and that should visible only on selection of 1 or more records.
Connect XRM Toolbox to your working CRM environment
Navigate to Home ribbon
Click on Custom button, here in my case it is “Capture Response”
To Enable Rules to add new enable rule click on +
Click on Add Step and select SelectionCountRule
Give Minimum field value as a 1
Navigate to RibbonButton command and click on Add Enable Rule
Select newly created enable rule from dropdown
Add this command to RibbonButton properties
Click on Publish