HideCustomAction and Display \ Enable rule in Dynamics 365


Imagine a scenario where we have both the disable rule and HideCustomAction implemented for a ribbon button. Let us see with an example what will happen in this scenario.

First, let us implement the display rule to hide the Delete button from Contact form when it is in a disabled state.

For active record à

We can see the delete button in the command bar.

For disabled record à The delete button is not visible.

Now let us hide the button using HideCustomAction

Interestingly the Delete button is not available in case of the active contact record this time.

The reason for this is because the HideCustomAction button removes the specified node from the ribbon so that it is not rendered instead of hiding it. Therefore any other enable or display rules are not applied to that button.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/customize-dev/define-custom-actions-modify-ribbon#hide-custom-actions

Hope it helps..

Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

One thought on “HideCustomAction and Display \ Enable rule in Dynamics 365”

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.