- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-01-2020 10:35 PM
Hi All,
I have requirement that whenever approval is rejected the notification is send to the requested for and approver.
So i have used email script and called in the body of the email, the mail is sending to the approver and requested for
email Script :
var gr = new GlideRecord(current.sysapproval.sys_class_name);
gr.get(current.sysapproval);
if(current.sysapproval.sys_class_name == 'sc_request')
{
email.addAddress("cc",gr.requested_for.email,gr.requested_for.name);
}
else if(current.sysapproval.sys_class_name == 'sc_req_item')
{
email.addAddress("cc",gr.request.requested_for.email,gr.request.requested_for.name);
}
}
Issues I'm facing is cc mail is captured in record (see the screenshot- cc Allen) but when i looking into email is not sending to requested for (screenshot attached- only Tim )
Could anyone help me on this?
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-02-2020 01:31 AM
Hi,
yes it would send email to the cc user as well. No need to show the cc user email in the recipient till the point it is working
that is out of the box behavior i.e. the recipient column stores users who are the direct recipient and cc stores the cc user etc
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
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-02-2020 01:31 AM
Hi,
yes it would send email to the cc user as well. No need to show the cc user email in the recipient till the point it is working
that is out of the box behavior i.e. the recipient column stores users who are the direct recipient and cc stores the cc user etc
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader