MVC_Nhibernate
MVC_Nhibernate

Reputation: 457

Dynamics CRM + Hide a button based on security role

I want to hide a button on the ribbon for all users except System Admin and I do not want to write javascript to check the security role of the logged in users. Is there any out-of-box way I can achieve this?

Also is there any entity that only admin has access to which I can use to hide show the button?

Upvotes: 0

Views: 2836

Answers (2)

mg.vijaya ragavan
mg.vijaya ragavan

Reputation: 1

Yes you can try this option.

  1. Create a Custom Entity (Custom Button Privelege)
  2. By default only Sys Admin/Cust role will have Privelege to do CRUD operation.
  3. In the custom button -> Display Rule. Set a Entity Privelege Rule based on the custom entity.
  4. Now the button will be visible only for the Admin users & will be hidden for other users.

Similarly we can modify the security role for others as well.

Upvotes: 0

Yes, you can achieve this without code.

One option is using MiscellaneousPrivilgeRule under display rules and making sure to pick some privilege like Publish Duplicate Detection Rules which may not be given to non-Admin roles.

enter image description here

enter image description here

Read more

There’s no OOB entity for that purpose, you can identify one in your system or create a dummy entity for that purpose.

Upvotes: 1

Related Questions