- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 08:00 AM
For our SLA warning/breach emails, they want us to send the notification to a sub-set of people within the assignment group and the assignee. I have identified the people who should receive the SLA emails by adding a flag to the sys_user_grmember table (u_sla_escalation) and setting it to true for the appropriate people within the group. what is the best way to grab these people to send them the SLA emails? I was thinking I would parse through the group members to find them and pass a string of the sys_ids (comma separated) in one of the event parameters. Would this work? Examples of event params I found in the documentation only show a single user.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 09:23 AM
Hi Kristen,
Yes you can acheive this using below code
var userList = [];
var userRec = new GlideRecord("sys_user_grmember");
userRec.addEncodedQuery(YOUR-ENCODED-QUERY); // this should have filter to assignment group and the user has the checkbox true
userRec.query();
while (userRec.next()) {
if (userList.toString().indexOf(userRec.sys_id) == -1) {
userList.push(userRec.sys_id + "");
}
}
gs.eventQueue("EVENT-NAME", current, userList.toString());
Regards
Anantha Gowraram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 09:23 AM
Hi Kristen,
Yes you can acheive this using below code
var userList = [];
var userRec = new GlideRecord("sys_user_grmember");
userRec.addEncodedQuery(YOUR-ENCODED-QUERY); // this should have filter to assignment group and the user has the checkbox true
userRec.query();
while (userRec.next()) {
if (userList.toString().indexOf(userRec.sys_id) == -1) {
userList.push(userRec.sys_id + "");
}
}
gs.eventQueue("EVENT-NAME", current, userList.toString());
Regards
Anantha Gowraram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2017 09:53 AM
Thanks for the guidance!