Populate the 'to' field in Email Client template

russellprice
Tera Contributor

Hi

I have setup a Client template for incidents which uses a script to populate the email client (envelope Icon) with details of the incident. I would also like to automatically populate the the 'to' field with the owner of the selected CI in the incident record. The problem is, no matter what I do I cant seem to script anything that populates the 'to' field?

I suspect the 'to' field in the email client cant be populated with scripts? and the email address must be entered directly?

Can anyone suggest a way round this? I really need the email client 'to' field to be dynamic.

Thanks

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

You can do this with an email client Template from System Policy> Email> Client Templates.

 

You can dot-walk to your email field through any field on the form. Example from Customer Service:

 

find_real_file.png

 

Docs: Create an email client template

View solution in original post

17 REPLIES 17

Scott B1
Kilo Contributor

I'm looking for an answer to this as well.  Is this a known issue within Kingston?

Scott B1
Kilo Contributor

I was able to Dot-walk several related tables to auto-fill an email address in the 'To' field in our Kingston instance.  The starting point is assumed to be 'current' record.  The javascript: value within the script's 'To' field did not work.

find_real_file.png

 

 

Peter de Bock1
Mega Guru

hi Russel and others,

I am just plying with the Email Client Template functionality in ServiceNow.

Setting the "To" can be done via a javascript, i.e. 

javascript:
current.caller_id.email

Very powerful is the ability to add the fields "Conditions", "From" and "Reply to". The fields can easily be added by configuring the form. The business logic (technique) behind it is already in place in ServiceNow.

With the Conditions field you are able to create and use multiple Email Client Templates for a single table like Incident. With the "From" and "Reply to" attributes you can define a specific label which is shown when the mail arrives in the Users email client (i.e. Outlook).

See some examples below

regards, Peter

find_real_file.png