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.

Display reference field value into string fields

Kishore8
Kilo Guru

My script is not working:

var one = current.u_group.getDisplayValue();

var gr=new GlideRecord('sysapproval_approver');

gr.addQuery('document_id', current.sys_id);

gr.query();

if(gr.next())

{

gr.u_kb_group=one;

gr.update();

}

find_real_file.png

25 REPLIES 25

it is not working in my environment.


Hmm, can you try to reproduce the same thing in your personal Dev?


Hi Dylan,



i requested here, when Approver record is created   in KB then immediately Group name should be copied in to u_kb_group(   in Approver record)


as like this aroundly 5 approver records will be created so when approver record created then immidiatly reflect value in Approver (u_kb_group) field




find_real_file.png


Hi,



find_real_file.png



find_real_file.png


Let me know if it's your PDI, I can have a look.