- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 08:45 PM
Sure! I only need the name - here is what I have in the Notification Email Script:
var emailBody = onCallSchedule();
template.print(emailBody);
function onCallSchedule(){
var groups = [];
var gr = new GlideRecord('sys_user_group');
gr.addQuery('JOINsys_user_group.sys_id=cmn_rota.group!active', '=', 'true');
gr.addOrderBy('name');
gr.query();
while (gr.next()) {
groups.push(gr.sys_id.toString());
}
var fsr = new FormattedScheduleReport();
fsr.buildSchedule(groups.join(','), gs.today());
var html = fsr.getReport();
return html;
}
And my output is when in Notifications: