Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

Just to be sure (because I notice in my post above that it has changed from what I pasted) it needs to be the word javascript followed by : and then the string - gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">", assigned_to"
Seems it doesn't like it when pasted like that into the post. 

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

 

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

@Michael Jones - 

Of course got that. 

Ankur Bawiskar
Tera Patron
Tera Patron

@Shruthika V1 

try this

javascript&colon; gs.getUser().getEmail() + ',' + current.assigned_to

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

@Ankur Bawiskar 

Its only populating logged in user in workspace and it's empty in itil view. It's not working with just this javascript&colon;gs.getUser().getEmail() anywhere

@Shruthika V1 

is it working fine in native?

Are you in scoped app?

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