Search code examples
dynamics-crmmicrosoft-dynamics

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?


Solution

  • 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.