- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 12:29 AM
Hi,
I have created a table in a scoped Application.How can I hide the "Delete"UI action in both form and list with out modifying Access controls?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 05:50 AM
Hi @Madhan007,
So my response is not lost in the thread, I'm reposting here.
Having reviewed your question, as @Anurag Tripathi has outlined, best practice here is to control this via ACLs.
Essentially you'll need to create 2 ACL's - one for 'delete' access, and the other for 'list edit' access.
Once you've specified exactly which role can delete (eg admin, however, I would encourage you to think about other users so admins/devs become an achilles heel to the process), all users that don't have the role will not be able to delete or see the UI Action.
Below, I've provided an ACL on the Problem table where only users who have the 'itil_admin' or 'problem_admin' role can delete a record. If a user views a Problem without this role, they will not see the 'Delete' button (The UI Action)
Reminder, you'll need to create an ACL for both the 'delete' and 'list_edit' actions.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 01:24 AM
Why do you want to hide them, without doing something with who can and can't use something?
But maybe this will help: https://www.servicenow.com/community/developer-forum/how-to-disable-or-hide-the-delete-button-in-for...
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 01:25 AM - edited ‎02-06-2024 05:49 AM
Hi @Madhan007,
Having reviewed your question, as @Anurag Tripathi has outlined, best practice here is to control this via ACLs.
Essentially you'll need to create 2 ACL's - one for 'delete' access, and the other for 'list edit' access.
Once you've specified exactly which role can delete (eg admin, however, I would encourage you to think about other users so admins/devs become an achilles heel to the process), all users that don't have the role will not be able to delete or see the UI Action.
Below, I've provided an ACL on the Problem table where only users who have the 'itil_admin' or 'problem_admin' role can delete a record. If a user views a Problem without this role, they will not see the 'Delete' button (The UI Action)
Reminder, you'll need to create an ACL for both the 'delete' and 'list_edit' actions.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 03:45 AM
Hi @Robbie ,I dont want users to delete the records both in form and list. Does that mean I have to edit the existing conditions of the two global "Delete" UI actions, one with form action and one with List action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 04:03 AM
Hi,
Best way to do so would be to do this via DELETE ACL, Stop it at source and securely and UI actions, form / list will all fall into place, so out of curiosity, why don't you want to take this approach?