- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2025 10:30 PM
I want the UI actions displayed in the cell context menu to be visible only to admins.
I set the "Requires role" for the UI action to admin, but it was not hidden.
Is this not possible to use this on the list screen?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 08:04 PM
then don't touch the OOTB UI action
Ensure you override that for your custom table
1) open the OOTB one
2) change the table to your custom table
3) add this in condition
current.canWrite() && gs.hasRole('admin')
4) Right click form header and "Insert and Stay"
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 10:36 PM
Hey @bonsai , You can try the method suggested by @Ankur Bawiskar .
When I was trying to recreate this in my PDI, I used the 'UI Action Visibility' option from the related lists. I added 'Admin View' to the list, and that helped hide the UI Action to other non-admin users. You might want to try that too, if it works for what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 03:44 PM
Test the task with an extended custom table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 10:36 PM
Hey @bonsai , You can try the method suggested by @Ankur Bawiskar .
When I was trying to recreate this in my PDI, I used the 'UI Action Visibility' option from the related lists. I added 'Admin View' to the list, and that helped hide the UI Action to other non-admin users. You might want to try that too, if it works for what you need.