
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2019 02:40 AM
Suppose there are Approvals generated for RITM. Then in the workflow we must make modifications such that, if Manager of the user(Requested for) has Approved it then other Approvals should become no longer required otherwise we need Approvals from all the Approvers.
Please let me know how to proceed with this ? And also provide sample script that needs to be written in workflow.
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2019 08:13 AM
I have used below code in Approval Script to achieve this.
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.addQuery('approver', current.request.requested_for.manager);
gr.addQuery('state', 'approved');
gr.query();
if(gr.next()){
answer = 'approved';
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2019 03:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2019 03:10 AM
Sorry my question may have confused you, but I want to code this in workflow, so that if manager has Approved the RITM then other Approvals should become No Longer Required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2019 03:07 AM
also there will be notifications configured. once approved user will get a notification.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2019 08:13 AM
I have used below code in Approval Script to achieve this.
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', current.sys_id);
gr.addQuery('approver', current.request.requested_for.manager);
gr.addQuery('state', 'approved');
gr.query();
if(gr.next()){
answer = 'approved';
}