How to dot walk approving record in approval table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:45 AM
Hi All,
How can we dot-walk and get the assignment group of the ticket in approving field in approval table.
Kindly assists.
Regards,
Karthik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:56 AM
Hi,
You can look for Approval For.Task fields?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 12:13 PM
Hi Jaspal,
My requirement is to make the assignment group looped in CC in the approval email sent to approvers.
For this I am writing a mail script which I will include in the email notification written on sysapproval_approver table.
I was strucked at the point to dot-walk the assignment group of the approving record in sysapproval_approver table.
As the approving is the document_id field , I guess .task won't work, please let me know if I am wrong and if so please help me with the requirement I have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 12:38 PM
If it is required in CC use below mail script
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var usersare = '';
var grpis = new GlideRecord('sys_user_grmember');
grpis.addQuery('group', current.sysapproval.assignment_group);
grpis.query();
if (grpis.next()) {
usersare = grpis.user + ',' + usersare;
}
for (var i = 0; i < usersare.length; i++) {
var user = new GlideRecord("sys_user");
user.addQuery("sys_id", usersare[i]);
user.addQuery("notification", 2);
user.addQuery("email", "!=", "");
user.query();
if (user.next()) {
email.addAddress('cc', user.email, user.getDisplayValue());
} else {
email.addAddress('cc', usersare[i]);
}
}
}
})(current, template, email, email_action, event);
If the recipient in To works fine then you can directly add the recipient list by dot-walking as suggested by Tony.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:56 AM
Share your requirement, I believe you are planning to trigger an approval for the assignment group of the ticket.
You can use flow designer to generate and select group approval field as assignment group