The CreatorCon Call for Content is officially open! Get started here.

Script for Change Approval

Allison3
Kilo Guru

We have an Emergency change workflow that generates approvals. Then an email notification is fired once the approval is created letting the group know an approval has been created. We have an out of the box email template for routine changes, but I'm needing to alter this for emergency changes. There are 3 different approvers for Emergency and each email will need to look a little different.

I've created a template for all 3 off the different approvals. However, I'm not sure how to get the notification to send during the different approvals based on the filter conditions.

One example:

A group approval. The group type = Bus Approval so I need it to pick this.

Since the approval is pointed at the sysapproval_approver table I'm not able to get filter condition of approval group = type =bus approval. Does this need a script? Is there maybe a different way I can do this? Can I kick off the email in the workflow on the approval-group activity?

find_real_file.png

1 ACCEPTED SOLUTION

marcguy
ServiceNow Employee
ServiceNow Employee

I think you can dot walk to the group approval record by using the 'group' field on sysapproval_approver? do you see a field called group? that's the one that links that approval to the approval group record. so group.type or if type lives on the group group.assignment_group.type


View solution in original post

2 REPLIES 2

marcguy
ServiceNow Employee
ServiceNow Employee

I think you can dot walk to the group approval record by using the 'group' field on sysapproval_approver? do you see a field called group? that's the one that links that approval to the approval group record. so group.type or if type lives on the group group.assignment_group.type


I found it under group.assignment_group.type. Thanks! I knew it was there I just couldn't find it.