How we can disable delete operation in all of the servicenow tables

Shreya Nagar Na
Tera Contributor

Updating the role as an admin for all delete operations in the ACL is possible, but it is not a straightforward approach. Is there a simpler way to ensure that only admin can delete records from all tables?

 

1. Only admin can delete record no one else can delete any record in any table .

2. Its a global change not limited to any specific table .

6 REPLIES 6

Harish Bainsla
Tera Sage
Tera Sage
  • Navigate to System Security > Access Control (ACL).
  • Click New.
  • Fill in the following:
    • Type: Record
    • Operation: delete
    • Admin Overrides: check this box
    • Name: * (This means "any table," but you can give it a more descriptive name if you prefer)
    • Role: (Leave blank, this will apply to any non-admin role)
    • write below script

answer = false;

if (gs.hasRole('admin')){

 answer = true;

 }

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Please do understand the consequenses of such, and that you definitely NOT want to do this. There are numerous operations where non-admin users should be able to have delete rights. From simple actions like deleting Favorites to more complex things like many-to-many records on Task records.

 

So definitely DON'T go this road. You don't want to do this at all!

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn