Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

want to remove delete ui action for all tables in servicenow

arjun0101
Tera Contributor

 

 

I want to remove delete ui action from all tables in ServiceNow. Only admin have access to delete records.

Do i need to update ui action/ACL for every single table or can i have any property to update so that it will remove it from all tables at once?

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @arjun0101 

 

Answer is yes but lets take other way, create new ACL and for all tables and try and once work done, deactivate the new ACL.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sandeep Rajput
Tera Patron
Tera Patron

@arjun0101 Apart from adding admin role in Delete ACLs, you can also create business rules with onBefore delete operation on different tables and inside script you can check 

 

        // Add your code here
        if (!gs.hasRole('admin')) {
            gs.addInfoMessage('Delete Operation not allowed for non admin users');
            current.setAbortAction(true);
        }

Hope this helps.