0
votes

is there a way to display a custom ribbon button only, if the value of a metadata attribute is equal to a specific value?

In my example I want only show a custom ribbon button on all forms, if the sharepoint documentmanagement is enabled for the current entity type.

For example: I activated the sharepoint documentmanagement for the entity "account" but not for the entity "contact". If I am at the form for an account I want the crm to show the custom button. If I am at the form for a contact I want the crm NOT to show the custom button.

Best Regards and thank you, Gerrit

1

1 Answers

2
votes

Only way i can suggest is to use CustomRule that will enable/disable button instead hiding it (here is more info about disable rules). Custom action could call jsript, which will execute RetreiveEntityRequest to verify is Sharepoint is Enabled for entity.

Normally you would use EntityPropertyRule from ribbon display rules. Unfortunately SharePoint integration property is not among supported ones.

Here you can find more information how to customize ribbon