- 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
09-20-2016 01:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2016 01:25 AM
I guess the question was more on how to get them into the process
We have used an approach like this:
- Create new field on record (e.g. change_request) to enable adding of ad-hoc approvers
- within workflow have an approval activity which adds the ad-hoc mentioned users to the approval list (some scripting required)
- 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
09-20-2016 02:00 AM
Hi Richard,
As you mentioned it depends upon the requirement we can use Run script, here vinay didn't mentioned his requirement and asked what are the ways for adhoc approvals, so I mentioned him to design a workflow and use the Approval coordinator activity. I accept that you have mentioned is also right, But again it depends upon the requirement. we have designed some workflows exactly same what you have mentioned using run script activity.
Thanks.