How can i call two script include in email client Recipient?

Ankit Kumar6
Tera Contributor

How can i call two script include in email client Recipient, 

As shown in below SS instead of CC how can i call that on To 

 

AnkitKumar6_0-1755524895641.png

 

4 REPLIES 4

OlaN
Giga Sage
Giga Sage

Hi,

The use case for these templates is to pre-configure the recievers of the mail. Not to have them evaluated dynamically through a script.

 

If that is the case, you should set up some event/flow or some other mechanism that calls an email notification and can dynamically evaluate and populate the recievers of the notification.

Hello @OlaN 

I have created a script include that is dynamically evaluate and populate the recievers on "To " and "CC"

field but i want to pass all the receiver in "To" field only.

Yes, understood.

And like I tried to explain, you cannot use an Email Client Template for this purpose.

It does not allow you to configure dynamic recievers.

You will need to find another method to trigger the email to be sent out.

Ankur Bawiskar
Tera Patron
Tera Patron

@Ankit Kumar6 

As per my understanding you can use script include to set CC or BCC and Recipient (To) in email client template.

but please check this link and it lists some limitations.

AnkurBawiskar_0-1755586043474.png

 

2 Ways to Leverage Scripting in Email Client Templates 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader