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.

GlideRecord was not working inside mail script

Jaeik Lee
Mega Sage

I used GlideRecord in mail script, but it did not work. 

that is parts of my script using GR.

 

var tt = new GlideRecord("incident");

tt.addQuery("sys_id", current.sys_id);

tt.query();

while(tt.next()){

 ...inside code...

}

 

 

1 REPLY 1

Anand Kumar P
Giga Patron

Hi @Jaeik Lee ,

If you’re notification is in incident table you can directly get value with current object 

template.print('Hello ' + current.caller _id.getDisplayValue() + ',');

 

Notifcation html ${mail_script:mail_scriptname}

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand