Email Client Template not populating CC

Shruthika V1
Tera Contributor

There is a requirement to create email client template and have the cc populated with current logged in user and "assigned to" of the form. But when we put it together as javascript &colon; gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">",assigned_to in the cc field its not populating anything. What are the other ways to achieve the same?

13 REPLIES 13

Robbie
Kilo Patron
Kilo Patron

Hi @Shruthika V1,

 

Take a look at the below articles. This should provide you with the solution required.

 

To help others looking for a similar solution (or for one-to-one direct help), please mark this response as correct and helpful.

 

Thanks, 

Robbie 

 

https://www.servicenow.com/community/itsm-forum/email-client-template-from-who-clicked-the-icon/m-p/...

https://www.servicenow.com/community/itsm-forum/email-client-template-auto-populate-recipient-as-the...

It needs to be populated on Cc and it should have both assigned to and logged in user. When we input just assigned to or just logged in user it works. The combination is not working

Michael Jones -
Giga Sage

So this definitely works for me: 

 

javascript&colon; gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">" ,assigned_to

 

One caveat that might be causing the issue you are seeing (nothing populating the Cc field) is that the system will not allow duplicates in the To, Cc and Bcc fields. So if the same value (whatever assigned_to, or gs.gs.getUser().getEmail resolves to) is in the To field then you won't see that same value show up in the Cc field. 

 

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

@Michael Jones - 

same user is not used in to and bcc.