The chooseWindow(first,last) method return you set the first and last row number of records that you want to retrieve.
Example:
/Find the last 10 incidents created
var in= new GlideRecord('incident');
in.orderByDesc('sys_created_on');
in.chooseWindow(10, 20);
in.query();
while(in.next())
{
gs.log("Incident Number="+in.number)
}
How to use chooseWindow with GlideRecord in ServiceNow
admin Changed status to publish December 19, 2023
Sorry, you do not have permission to read comments.