0

The addExtraField() method allows you to query dot-walked fields in a single database request, rather than perform multiple queries per dot-walked element in a form or script

var gliderecord = new GlideRecord("incident");
gliderecord.addQuery("number", "INC00412323");
gliderecord.addExtraField("cmdb_ci.location.contact.name");
gliderecory.query();
gliderecord.next();
gs.print(gr.cmdb_ci.location.contact.name);

Use of addExtraField() Method ServiceNow
Working Code Asked question March 6, 2024