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.

How to use variables of record producers for the notification.

Kruthik
Tera Contributor

Hi All,
I have a requirement where I need to use variables of record producer for notification but there is no direct reference for the record producer variables only I can see the variables in form but on the notification table I am not getting those reference fields. So is there anyway I can use those fields and map in notifications please do share if anyone has pointers on this.
Thanks in advance

1 REPLY 1

Shekhar Navhak1
Kilo Sage

Hi @Kruthik,

 

Record producer variable values are stored in 'question_asnwer' table.

You can write mail script to fetch variable values as showed in below script:

 

var queAns=new GlideRecord('question_answer');
queAns.addQuery('table_sys_id', current.sys_id);
queAns.query();
while(gr.next())
{
gs.info(queAns.question.getDisplayValue()+ ": "+queAns.value.getDisplayValue()+"\n");
}
Please mark the answer correct/helpful based on Impact.
Regards, Shekhar