GlideRecord - _query(Object field, Object value)

Identical to query(). This method is intended to be used on tables where there is a column named query, which would interfere with using the query() method.

Runs the query against the table based on the filters specified by the addQuery() and addEncodedQuery() methods. This method queries the GlideRecord table as well as any references of the table. Typically this method is called without arguments. If a name/value pair is specified, the "name=value" condition is added to the query.

Table 1. Parameters
Name Type Description
name Object Column name on which to query
value Object Value for which to query
Table 2. Returns
Type Description
void

Scoped equivalent

To use the _query() method in a scoped application, use the corresponding scoped method: Scoped GlideRecord - _query(Object field, Object value).

var rec = new GlideRecord('sys_app_module');
rec._query();
while (rec.next()) { 
 gs.print(rec.number + ' exists');
}