Scoped GlideRecord - hasNext()

Determines if there are any more records in the GlideRecord object.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if there are more records in the query result set.
var rec = new GlideRecord('incident'); 
rec.query(); 
if (rec.hasNext()) { 
  gs.info("Table is not empty"); 
}

Output: