- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 06:26 PM
Hello,
I want to remove 'Delete' functionality for the Approvals for a change request, except for Admins.
Also, just want it specifically for change requests. I tried to go the ACL route, at the 'sysapproval_approver' table at 'delete' operation
with
answer = gs.hasRole('approval_admin');
but them I though it will also alter the Approval for other request types.
Any idea how to resolve it?
I was thinking just disable the 'Delete' buttons in the UI (highlighted in yellow)
But I am not sure the what exactly is it and how to disable it. If it is a UI Action/ Script??
And then finally disabling this button.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2017 02:49 PM
So this is what I ended up doing in the ACL for 'sysapproval_approver' , operation 'Delete' in the script section.
The following code check if the request is a 'change_request' or not. If it is and the User who is trying to delete the Approval Request has to have an 'approval_admin' role to delete it. Alternatively, if the request type is anything other then 'change_request' it follows the usual serivenow approval deletion process.
Here is the ACL Code:
if (current.sysapproval.sys_class_name == 'change_request')
{
answer = gs.hasRole('approval_admin');
}
else
{
answer = gs.hasRole('approval_admin') || gs.hasRole('itil') || gs.hasRole('catalog') || isApprovalMine(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 07:03 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 07:06 PM
Hi Som,
I believe you need to check this button in UI Policy, it a global Delete Button as List Choice.
You can override this option as per your requirement, Please check below for more info if it helps.
Override or remove a UI action for an extended table
How to override OOB UI Action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 07:37 PM
Hi Som,
I would suggest to add one Filter condition in the sysapproval_approver.None ACL and set the role in Required role embedded list. Please refer the below screenshots. This will automatically serve the both requirements, i.e., disabling the List Choice type and Form Button type 'Delete' UI Actions.
I hope this helps. Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 09:34 AM
Hi rocktheboat ,
Were you able to have a look at my last response?
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View