- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:08 AM
Hello experts,
From the script include i have the incident sysid. From the script include, I need to send an email to all the assignment group members.
Can anyone help me what to pass in the parm1 so that i can call the notification using gs.eventqueue
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:32 AM
Hello @Deepika54 ,
Use below script -
var groupMemeber = new GlideRecord("sys_user_grmember");
groupMemeber.addQuery("group.name=<YOUR GROUP NAME HERE>");
groupMemeber.query();
while(groupMemeber.next()){
var param = {
"approver_name" : current.approver.getDisplayValue(),
"group_memeber_name": groupMemeber.user.getDisplayValue();
}
gs.eventQueue("<EVENT CREATED>", current, groupMemeber.user.toString(), param);
}
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:18 AM
You can tick 'include members' on the group record and have the notification send to the assignment group. It will include the assignment group members automatically. No need to configure that in a script include.
For future reference: when asking for assistance with a script, it will always help if you share the script. In this case it's not necessary, because you don't need to change the script. And, depending on the requirement behind your question, you may not even need a script include.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:19 AM
Hi @Deepika54
From the Script Include, simply trigger the notification without passing the params.
Then, in the notification record's 'Who will receive' section, select 'Assignment Group' under the 'Users/Groups in Fields' option. So that, the email will be triggered to the assignment group memebrs of the current incident.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:36 AM
That only works when you set 'include members' on the group record.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 04:38 AM
Yes, that's correct. If the group record has a group email address defined, then the 'Include Members' option should be checked. This ensures that the email notification is sent to both the group email address and all individual group members.