Hide a ribbon button on SubGrid for specific primary entity

When need to hide a button on a subgrid, we can solve this by just hiding the button. But in case we need to hide the button only on specific primary entities then we need to write/construct an enable rule. 

Here I was a having problem to hide the "+ New Activity" button on activity subgrid only when the subgrid is on the Contact entity. Achieved it by following quick steps :)


Create a solution | add Activity entity in solution | Open the solution in Ribbon Workbench | Right Click "Add New {0}" in the subGrid ribbon | Click Customize Command | find the command | add an enable Rule | add a step [EntityRule] | define it as following.




Publish the solution by clicking the Publish button in the top.






1 comment: