Scoped GlideRecord - isValidRecord()

Determines if current record is a valid record.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if the current record is valid. False if past the end of the record set.
var rec = new GlideRecord('incident');
rec.query();
while (rec.next()) { 
  gs.info(rec.number + ' exists');
}
gs.info(rec.isValidRecord());

Output: