Dynamically Setting Recipients List Based on On-Call Schedule
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 10:45 AM
Requirement: Dynamically Setting Recipients List Based on On-Call Schedule to send out an SMS on the Major Incident Workbench.
Current Script:
(function() {
var currentTime = new GlideDateTime();
var recipients = [];
var groupSysId = current.assignment_group.sys_id;
//var groupSysId = 'f71dfc0a1b2efc10c59b43f4bd4bcbdf';
var onCallRotation = new global.OnCallRotationSNC();
var rotationMembers = onCallRotation.getEscalatees(groupSysId);
var userIds = rotationMembers.map(function(item) {
return item.userId;
});
// gs.log(JSON.stringify(userIds));
return {
'internal': userIds
};
})();If I put in the static assignment group the script pulls in the correct sys_id of the users on-call. I'm having trouble identifying how to pull in the "Current" assignment group on my Dynamic Condition. Has anyone done this before?
5 REPLIES 5
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2024 08:04 AM
Does anyone have any idea on this?