Scoped GlideRecord - get(Object name, Object value)

Defines a GlideRecord based on the specified expression of 'name = value'.

This method is expected to be used to query for single records, so a 'next' operation on the recordset is performed by this method before returning.

Table 1. Parameters
Name Type Description
name Object Column name
value Object Value to match. If value is not specified, then the expression used is 'sys_id = name'.
Table 2. Returns
Type Description
Boolean True if one or more matching records was found. False if no matches found.
var gr = new GlideRecord('incident');
gr.get('99ebb4156fa831005be8883e6b3ee4b9');
gs.info(gr.number);

Output: