Add cc mail address in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi Team,
I Have created mail script to pass cc mail id address in my notification; I have below script in mail script it does not work.
(function runMailScript(current, template, email, email_action, event) {
var ritm = current.request_item;
if (!ritm) {
gs.info("RITM not found in notification script");
return;
}
var servicetype = ritm.variables.service_type;
gs.info("Service Type in notification: " + servicetype);
if (servicetype === 'csq') {
email.addAddress('cc', 'CustomerSecurityQuestionnaires@TEST.com', 'Customer Security Questionnaires');
} else if (servicetype === 'contract') {
email.addAddress('cc', 'SecurityContractReview@exchange.TEST.com', 'Security Contract Review');
template.print("Service Type: " + servicetype);
} else if (
servicetype === 'customer_audit' ||
servicetype === 'customer_special_request' ||
servicetype === 'security_certification'
) {
email.addAddress('cc', 'CustomerTrust@TEST.com', 'Customer Trust');
}
})(current, template, email, email_action, event);
can you please help me on that.
thank you
Sivananda reddy
7013042794
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
so notification is on sc_task table
Are you able to get the variable value?
what debugging did you do?
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