Hello All,
I have created 2 customs buttons using the "Customize Command Bar" option. The buttons work fine, and the field level visibility conditions work as required.
The problem I am facing is that these buttons should be visible to people only assigned a specific security role.
When I imported the custom entity into a test solution and opened it in Ribbon Workbench to add the rules based on a user's security role, the buttons were not visible in the ribbon workbench.
Is there any way to get the buttons on the ribbon workbench? Or since they are treated as components, it is not possible?
If the latter, is there any workarounds for adding Security role based visibility conditions apart from using the ribbon workbench?
Thank You,
Biswa
I was able to take away Delete permission from the other conflicting role after discussions with the team and used DataSourceInfo to meet the visibility requirements.
What you can do is grant one role access to one of the core tables that aren't used in your app. Say your app does nothing with the 'contact' table - grant one role "Append" access to the contact table and ensure the other does not have it. Then you can do a similar access check with modern command buttons that don't affect your app.
Thought as much.
Thank you for the confirmation
Thanks for the response.
Unfortunately, I have 2 different security roles with similar access levels, it's just that one of them is for admins (users who should see the buttons) and one is for managers (they have CRUD access as well).
However, this will work in scenarios where roles have different accesses to the entities.
For modern command buttons, the visibility can be access based not security role based.
for example, you can check if the current user has ‘create’ or ‘delete’ org-level permissions on the systemuser table to check if they are an admin… versus checking for the System Administrator role.
so if your security role has a unique access level, you can use that instead of checking for a specific security role by name.
Unfortunately, that is the major disadvantage of using low-code ribbon buttons, I also hate it;) For that type of scenario you have to use buttons developed completely in Ribbon Workbench.
stampcoin
15
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1