Recently we had a requirement where we had to hide the Delete buttons on Entity List for records having Status Reason as “Submitted” and show it only for “Draft” records.
First thought came to my mind was using Javascript on load event and hiding the button through script. Of course this works but after checking some configurations before going for coding i got to know about the below OOB option to achieve this.

Clicked on the Advanced settings in the Grid Configuration where you add any button (in my case I have added Delete button).
So there is a field named Filter Criteria for each button which we select to shown in the List.
So what we have to do is just create a Fetch XML using Advance Find and have the condition defined in it and then download the same and paste it in the Filter Criteria field in CRM. And there you go it works like a charm without adding any custom code !!

Similarly can be done for Subgrid Configurations.
Hope this helps !




