Unable to query using next() on table having column name "Next"SummaryIssue When querying the OOB table "sys_template" using a script with next(), it doesn't return all records. Example The script: var grTemplate = new GlideRecord('sys_template'); grTemplate.query(); gs.print(grTemplate.getRowCount()); while(grTemplate.next()){ gs.print(grTemplate.sys_id); } Doesn't give the expected Sys_id. Reason There is a field named "next" on the sys_template table. Solution Use "_next()" instead of "next()" in the script: while(grTemplate._next()) // Line 4 Explanation "next()" goes to every record"hasNext()" tells whether there is a record satisfying the query"_next()" is used when your table field/column name is "name"