Send a notification to CC users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 07:03 AM
Can someone please help me on the below query
I want send a SLA breach notifications to CC and To users, for this i have written a email script and passed through a notification an for To users i have given directly to user from whom will receive.
It is taking only To users in the Email. Please help me on this query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 07:10 AM
for sending CC you need to use email script and use email.addAddress(cc)
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 10:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2023 11:31 AM
Hey @nikhitha24 ,
Try this
.1 Create email script - sys_script_email_list.do in this table
2. Provide the Name of the email script
3. For example DL is required for Incident Table Notifications, In the Script write the code like below:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var gr = new GlideRecord("incident");
gr.addQuery("sys_id", current.sys_id);
gr.query();
if (gr.next()) {
email.addAddress("cc", "provide your DL name here");
}
})(current, template, email, email_action, event);
Add this email script to your email notifications Body(Message HTML) - ${mail_script:DL_CC}