Wednesday, October 29, 2014

How to hide Add Existing Associated Ribbon Button for specific Custom Entity in MSCRM 2013/ Use of “Form Entity Context Rule”

Following is the link with helped me solve the issue, however to explain in detail I will take my own example
Consider we have a custom entity called “new_demo” which has 1:N relationship with account , contact and any other custom entity

Now say for example we want to hide the “+ Add NEW DEMO” sign that shows up on the associated view only if the “new_ demo” entity subgrid is placed on account otherwise in all other cases we want to keep showing the  “+ Add NEW DEMO”.

To achieve the same via Ribbon workbench we need to follow the following steps.
·         Create a new solution and add the “new_demo” entity to that solution.

·         Open the solution in Ribbon work bench 2013

·         Select the “new_Demo” entity in the entities section of the ribbon workbench

·         Go to the subgrid section and select the “+ Add NEW DEMO” (note demo will be replaced with the name of the entity you are working with)


·         Clicking on “Customize command” will add a new command to the command tab

·         Select the command and right Click on it to edit display rules


·         Clicking on “Edit display rules will pop up the screen where you can add a new display rule by clicking on “Add New”


·         Click Add new and give a name to the new display rule and then click add step


·         In the steps select “form Entity Context Rule” and then set the values as following 


·         The above values will hide the “+ Add NEW DEMO” button from the associated view of the “new_demo” entity on account entity, on all other entities the button will keep showing up on the associated view of the new_demo entity. You can use the above to hide the button for your specific entity. Similarly changing these values can tweak the results in a way we want to hide/show the button on different entities.

No comments:

Post a Comment