var grIncident = new GlideRecord('incident');
grIncident.addExtraField("caller_id.department.dept_head.name");
grIncident.addQuery("sys_id", "c74706c61b670094bd8120a13d4bcb03");
grIncident.query();
while(grIncident.next()){
gs.info(grIncident.caller_id.department.dept_head.name.getDisplayValue())
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter