GlideElement - getRefRecord()

Gets a GlideRecord object for a given reference element.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
GlideRecord A GlideRecord object

Scoped equivalent

To use the getRefRecord() method in a scoped application, use the corresponding scoped method: Scoped GlideElement - getRefRecord().

var grINC = new GlideRecord('incident');
if ( {
  // Get a GlideRecord object for the referenced sys_user record
  var grUSER = grINC.caller_id.getRefRecord();
  gs.print( grUSER.getValue('name') );