- 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: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 08:47 PM
Hello @Deepika54 ,
Did my answer resolve your question?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:46 AM
Hi @Deepika54
Please check in your group if the member is included is true, if yes, teh members wil get email.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 10:45 PM
Hi @Deepika54,
Hope the following instructions help answer your query:
1. Event Registration
Name: incident.notify.assignment_group
Table: Incident
2. Notification Setup
Table: Incident
Trigger: Event is fired (incident.notify.assignment_group)
Recipients: Assignment Group under Users/Groups in Fields
3. How To Use
var grIncident = new GlideRecord('incident');
if (grIncident.get(incidentSysId)) {
// Trigger the event to notify assignment group.
// 'parm1' adds context and can be used in the notification as: Incident ${number} - ${event.parm1}
gs.eventQueue('incident.notify.assignment_group', grIncident, 'Notify Assignment Group', '');
}
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Best regards,
Duc Hoang