Trigger approvals to group members using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:48 AM
Hello everyone,
Hope you all doing good.
In a workflow I have already a Approval user activity where I have written script like if the standard change template version is this, then i am pushing approvals using answer.push for different users.
But here i want to trigger the approvals for 2 different change templates to the Assignment group members where the end user selects the group in the Assignment Group field on the change form.
So, without using another Approval Group activity in the workflow, can I write a script in the Approval User activity to trigger to the members of the Assignment Group that was selected in the change form?
Please provide me a solution
REgards,
Pallavi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:52 AM
Share the screenshots of your workflow activity and workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:58 AM
you can script like below
var answer = [];
var grGRM = new GlideRecord('sys_user_grmember');
grGRM.addQuery('group' , current.assignment_group);
grGRM.query();
while (grGRM.next()){
answer.push(grGRM.user.toString());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 03:32 AM
Hi Suvro,
Thank you. Will check and get back
Regards,
Pallavi