- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 11:01 PM
trying to get the managers list from script include and adding all of them in cc in notifications email script.
have list of event mappers. need to check if one of the event matches from the event mapper then execute the below. But its not executing. Appreciate the help.
if (eventMapper[event.name] == 'x_is_ma.create_request') {
var managersList = [];
if (current.u_submitt_on_behalf_of_email == '') {
managersList = utils.getManagersEmails(current.u_submitter_name.sys_id);
for (var i = 0; i < managersList.length; i++) {
email.addAddress("cc", managersList[i]);
}
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 02:36 AM
query sys_user with that email and pass the 3rd parameter as the manager name
are you sure it's getting inside this IF?
managersList = utils.getManagersEmails(current.u_submitter_name.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2025 02:36 AM
query sys_user with that email and pass the 3rd parameter as the manager name
are you sure it's getting inside this IF?
managersList = utils.getManagersEmails(current.u_submitter_name.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader