
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 06:27 AM
Hello guys,
Could you help me with this problem!
I have the need to filter witch itens are gonna to appear in the 'TO' and 'CC' form in the compose email modal (That one that appears when you select 'Email' in the three dot button.
I have configured everything nicelly, and select the TAB Sender Configuration and select the SCRIPT option, using the snippet bellow:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 06:48 AM
Hello @BRUNO BANDEIRA
The script you have configured is for showing the from address for the email. If you want to configure the TO, CC and BCC dynamically, you will need to create a script include and call that script include in the respective field in recipient tab (the script function should return string of comma separated email IDs.
Thank you,
Ali
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 11:21 AM
Thanks for your support @Ahmmed Ali and @Ankur Bawiskar this approach of javascript prefix did work for me!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 06:43 AM
where have you written the above script?
please share some screenshots
are you saying by default it should be set with that To and cc value?
if yes then you should set it here
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
01-02-2025 06:48 AM
Hello @BRUNO BANDEIRA
The script you have configured is for showing the from address for the email. If you want to configure the TO, CC and BCC dynamically, you will need to create a script include and call that script include in the respective field in recipient tab (the script function should return string of comma separated email IDs.
Thank you,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 08:00 AM - edited 04-23-2025 08:04 AM
Hello @Ahmmed Ali
I have the same issue even if I called the script include from "To" field of email client template it doesn't auto populate recipient list.
I can see its working with Washington and not in Yokohama. Any idea on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 11:17 AM
I have another suggestion. I have created a new field for the table with the type List and the reference is the user. I populate it with a script and then add the field name to the CC in the email client template. This is an issue with the fields To, CC, and BCC in the email client. You can only set one value for these fields with a script. If there are multiple values, nothing will appear.
Please give me "Helpful"