Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Unable to get mail script values into email

madhuravath
Kilo Contributor

Hi All,

 

I wrote email script to pick the values from system property and display it in email notification. But I am unable to see the email script values in the email.

 

Attached are the email script and notification images. Kindly assist me here

3 REPLIES 3

Ron28
Mega Sage

Hi, your script does not appear to return a value, maybe a simple "return DataImport" after setting the variable is what is needed?

Ron

KrishnaMohan
Tera Sage

Hi @madhuravath 

Add below line in your email script 

var DataImport = gs.getProperty("name_of_your_proerty");
template.print(DataImport);

 

Hope this answers the query. If it does, please mark the response as correct.

 

Thanks!

Krishnamohan

Ankur Bawiskar
Tera Patron

@madhuravath 

this is a duplicate question.

You already raised question yesterday

Unable to get mail script values into email 

I already responded there

you are just getting the value but not printing it

use this to print in email script and then it will show

template.print(DataImport);

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

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