- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 03:04 AM
I am using the below e-mail script to use the Parm 2 values in "CC" for e-mail notification.
email.addAddress("cc",event.parm2);
But, its not sending to "CC" in the e-mail.. Please help..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 03:17 AM
Hi,
did you try sending the 3rd parameter as well i.e. display name?
If event.parm2 is sys_id of user then query it and include display name
if that is email then query user table with email and include display name
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", event.parm2);
gr.query();
if (gr.next()) {
email.addAddress("cc", gr.getValue("email"), gr.getValue('name'));
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 03:59 AM
I wrote your query in the e-mail script and tried..
but..no
its still sending all the names in "TO"
no copied in CC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 09:16 PM
Hi,
can you share complete screenshots etc of notification, email script etc
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2022 03:54 AM
Hey. You are correct.
Sorry. It works now. Thanks