Hide OOTB Update Button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Everyone,
I have created one custom table and created records in it. So, when I open one of the records, I can be able to see update and delete button which are OOTB. That update button should be visible only to admins and for other users it should be hidden. This should happen only for the table I created. I tried
Scenario: 1
OnLoad Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Look for the UI Action record named Update that is on the Global table. Change the table on this record to your custom one, and temporarily change the name slightly so you know you're looking at the right one. Do an Insert and Stay on this record. This will create a copy of the Update UI Action specific to your custom table. After you confirm this part has worked as expected, you can make the name / button label whatever you want, and to the add the Condition &&gs.hasRole('admin') to only show for admins.
The other approach is to create a write ACL on the custom table that requires the admin role. The form may appear read-only, but the (out of box) Update button will not be visible as it has the canWrite condition to check for write access to the table.