- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2025 09:43 PM
On change request I have a related list that is a m2m relationship to a custom table. How can I disable Delete option to all users from the "Action on selected rows". I tried to use ACL but restricting delete is disabling the removal of the related records using the Edit button. I created a new ui action on this table and tried to restrict to admin but doesn't work. How can I disable this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2025 07:59 AM
Got it working following this:
Solved: hide delete option under related list except for a... - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2025 09:57 PM
When you edit the M2M table, the changes are essentially deletions or additions. Let's focus on the deletion aspect from your requirement perspective. If you decide to remove a relationship, it performs a background deletion of that relationship. By disabling the delete function, you are preventing any edits or removals of the relationship.
Could you please clarify the true intention behind disabling the delete function? Why do you prefer that only admins manage the M2M relationships?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2025 10:06 PM
Hello @samadam
Please create a "Deny Unless" Type "Delete" ACL for this record - this takes precedence over "Allow If" ACLs. So even if there are multiple ACLs granting access to any other roles it will be denied.
Something like below - choose your M2M table here.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2025 11:25 PM
Hi @samadam
You can acheive this by modifying the exisiting "Delete" ACL on your custom table.
1. Open the Delete ACL of type record on your custom table
2. In the "requires roles" section, add "admins" and remove the other roles (if any)
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2025 11:47 PM
share ACL is created on which script etc?
share screenshots.
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