- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 10:10 AM
Hi all,
my requirement is i need to hide Delete button for the particular roles.
ex: the user who has the test_manager, test_stall, role they was not able to see the Delete button.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 08:03 PM
Hi,
there should be 1 table level DELETE ACL
Search for that and add appropriate roles
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 10:22 AM
Hello ,
In the UI action condition you can write the below piece of code!
!gs.hasRole('test_manager')||!gs.hasRole('test_stall')
this will restrict the UI action visibility for the users who have above two roles.
Thanks,
Mohith.
Please mark helpful if this answers your questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 05:00 AM
but this UIAction written for Global table. it cause any issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 05:09 AM
then i suggest do not touch it because it might solve your issue but touching OOB things is always risky.
Try using ACL's for this.
Create a Delete ACL and give roles who can only delete the record this will automatically solve the issue and will hide the button for users who don't have roles mentioned in that delete ACL
please mark this helpful if it answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2022 05:47 AM