Ability to skip a second level approver if it's the same first (managerial) approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2016 12:40 PM
I have a catalog item where a user would request access to a specific area within an enterprise system. We require their manager to then approve their access, which works correctly based on the workflow. We then require approval from that department head (based on the variable the requester chooses from a list) before the task is created to provide the access, which works correctly based on the workflow.
However, there are times where the manager is also the department head, so that once they approve as manager, they then get that second approval as department head. I'm looking for a way to bypass this second approval if it's the same name as manager approval.
Thank you for any suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 11:33 AM
Did the Approval Rules work for you? Or did you need something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 12:34 PM
Try this business rule
Duplicate Approval Requests Not Required' Business Rule
Name: Duplicate Approval Requests Not Required
Table: Approval [sysapproval_approver]
When: Before
Insert/Update: true
Condition: current.state.changesTo('requested')
Script:
approveDuplicateApproval();
function approveDuplicateApproval(){
//Must have link to record being approved
if(current.document_id || current.sysapproval){
//Query for approval records for this user/record
var app = new GlideRecord('sysapproval_approver');
//Handle empty document_id and sysapproval fields
if(!current.document_id.nil()){
app.addQuery('document_id', current.document_id);
}
else if(!current.sysapproval.nil()){
app.addQuery('sysapproval', current.sysapproval);
}
app.addQuery('approver', current.approver);
app.addQuery('state', 'approved');
//Optionally restrict to current workflow
//app.addQuery('wf_activity.workflow_version', current.wf_activity.workflow_version);
app.query();
if(app.next()){
//If previous approval is found set this approval to 'approved'
current.state = 'not_required';
current.comments = "Approval marked by system as 'Not Longer Required' due to a previous approval on the same record by the same user.";
}
}
}
Prevent Redundant Approval Requests in ServiceNow - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 12:46 PM
Giving this a try now! Will report back shortly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2020 10:37 PM
Hello Mike,
Can you please share me what resolution did you find here.
Thanks & Regards,