
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022 12:39 PM
Hi
I have created a Notification to send when a Business application is Retired .
Now I have to copy the manager of the application in the Notification for that I created a Email script as below :
Name: Notif_Name
function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
email.addAddress("cc",current.u_manager.email,current.u_manager.name);
})(current, template, email, email_action, event);
and called the same in the Notification body as below:
${mail_script:Notif_Name}
Is that correct or should I put any Glide Record query in the email script to cc the manager? Kindly help with it.
Thanks and Regards,
Prakash Yadav
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 04:03 AM
Hi
please try below email script
Email Script:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
email.addAddress("cc", current.u_manager.email.toString(), current.u_manager.name.toString());
})(current, template, email, email_action, event);
Hope you it will help you.
Please Mark ✅ Correct/helpful if applicable, Thanks!!
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 02:35 AM
Notification email script:
email.addAddress("cc",current.variables.u_manager.email.toString(),current.variables.u_manager.name.toString());
//u_manager is variable in catalog item/Record producer