How add users in BCC from scheduled job to send report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 07:00 AM
Hi All,
I'm getting users list from scheduled jobs to send report. present i'm adding users in "To". But actually we need add users list in "BCC". How we can add this emails in "BCC"
Scheduled job script getting users:
var arrayUtil = new ArrayUtil();
arrayUtil.concat(recipients, recipientsRequestedBy);
var finalRecipients = arrayUtil.unique(recipients); // unique elements
gs.log("finalRecipients: " + finalRecipients);
scheduleReport.user_list = finalRecipients.join(',');
scheduleReport.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 07:03 AM
you can create email script and add cc/bcc logic there and then include that email script in message part of scheduled report
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 07:08 AM
Hi @Ankur Bawiskar ,
Thanks for your responses, above post they add adding users directly in BCC. But here i have users list in scheduled job from scheduled job to email script i need pass how we can achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 07:23 AM
adding cc or bcc is not available on scheduled reports
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader