Scoped GlideRecord - next()

Moves to the next record in the GlideRecord object.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if moving to the next record is successful. False if there are no more records in the result set.
var rec = new GlideRecord('incident');
rec.query();
while (rec.next()) { 
  gs.info(rec.number + ' exists');
}