- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2016 12:16 AM
Hi
What are the diff ways in which Adhoc Approvers can be added in Servicenow.
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2016 01:36 AM
Here's a snippet from a workflow I used to add an optional Manual Approver stage just ahead of CAB approval.
The standard workflow activity Manual Approvals can be dragged on to any workflow. This ensures if there are any manual approvers, and their approval has been requested, that the workflow doesn't proceed until they have all approved. (Or perhaps only one of them needs to approve. That's an option you can set from inside the WF actvity block.)
I have also used a Run Script block ahead of Manual Approvals to give the process a little kick. Normally, a user has to right-click and choose the Request Approval UI Action for each manually added approver. The script looks for any approvals in state Not Requested, and changes the state to Requested, so it saves a few clicks. Also users expect when they hit the Request Approval button at the top, the approval emails are sent automatically. Script below.
var chgId = current.sys_id;
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('sysapproval', chgId);
gr.addQuery('state','not requested');
gr.query();
var i = 0;
while (gr.next())
{
gs.log("Requesting approval for manually added approvers: "+ i +
' ' + gr.approver.getDisplayValue());
gr.state = 'requested';
gr.update();
i++;
}
As Harish points out above, you could also bring the Manual Approval activity inside an Approval Coordinator block. It will work just the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2021 03:53 AM
Hi, did you receive an answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2021 12:07 PM
No did you if so please share