Need to send an email to all RITM approvers after all approvals have been completed .

Kyle Scharkopf
Tera Guru

I have an Approval Coordinator set up in a workflow. I want to have an email (Basically saying that all approvals have been met) or a notification go out to all the approvers once all the approvals have been approved and the workflow moves on. I have tried different ways of doing this with email notifications on the sysapproval_approval table triggered from an event etc and can get an email to fire to a person or a group but not the "approver".... I also even tried to run a script that updates the comments on all the approval records...  That works, but it seems that if the record is all ready approved then the record will not send another email if it is updated.   I feel this should be a simple answer but I am stuck on it at the moment.  Thank you for your help!

1 ACCEPTED SOLUTION

dvp
Mega Sage
Mega Sage

Once all the approvals completed create a Run script activity and trigger an event

 

Script

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval", current.sys_id);
gr.query();
while (gr.next()) {
   gs.eventQueue('EVENT_NAME', gr, gr.approver.toString());
}

 

Event and notification should be created on sysapproval_approver table

View solution in original post

4 REPLIES 4

dvp
Mega Sage
Mega Sage

Once all the approvals completed create a Run script activity and trigger an event

 

Script

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval", current.sys_id);
gr.query();
while (gr.next()) {
   gs.eventQueue('EVENT_NAME', gr, gr.approver.toString());
}

 

Event and notification should be created on sysapproval_approver table

Thank you for your quick response DVP!  Should I have the email notification to be triggered by the firing of the event with the "who will be receive"  be "Approver" or?

Yes notification should be triggered by an event and in who will receive tab make sure both event creator and parm1 are checked

 

find_real_file.png

In the above example we are identifying recipient in the script

Yes!  The Parm1 string is the piece I was missing!  THANK YOU!