Adhoc Approvers

avinash21
Mega Contributor

Hi

What are the diff   ways in which Adhoc Approvers can be added   in Servicenow.

TIA

1 ACCEPTED SOLUTION

Here's a snippet from a workflow I used to add an optional Manual Approver stage just ahead of CAB approval.


manual approves in workflow.PNG



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.


View solution in original post

11 REPLIES 11

Hi, did you receive an answer

No did you if so please share