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

Ok, ignore that, I used the table name instead of the field name. That worked! Thanks

How can we add the user's name as well? the current method works but in case the name should also be included how can we add it? like Praveen K <praveen.k@example.com> ?

Please let me know if there is an easy method to this as well. Any help would be appreciated.

Thanks,

pK

Eureka! (or Paris, in my case)

I tried every other combination of ${contact.email}, current.contact.email, etc. before I stumbled onto this post.

How is this not included in the documentation?! (Also, am I mistaken, or is this one of the only places in the platform where you can freely mix literal strings with field names?)

 

EDIT: I guess it is technically included in the documentation--oops!

Enter a comma-separated list of either field names that contain user email addresses or specific email addresses.

@Chuck Tomasi - Hi, how can we populate the 'to' field if the requester is an external user not in the system?

So at the moment on our CSm project, it is possible to create a case via the employee center and it is also possible to create a case via an email.

When a case is requested via the employee center, we then select 'reply' on the email client template on the case form and the 'to' field is populated as expected.


However, if an external user (not a user on the sys_user table) sends an email, when this creates a case, if we navigate to the email client template on the case form, the 'to' field is not prepopulated with the external users email address. Can you please advise on how we can make this possible?

 

When a case is created via email, the case form gains a 'from_email' custom field, which is populated with the external senders email address. So maybe its possible to do something here?

michaelward
Tera Guru

This is actually busted on my Kingston instance.  A simple field.email (contact.email) doesn't work - neither does javascript.  Looking for a solution