ServiceNow - Target a segment of records in GlideRecord using chooseWindow

 https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/c_GlideRecordScopedAPI 

Example

This show returning records 3 and 4 from the Incident table.

var now_GR = new GlideRecord('incident');
now_GR.orderBy('number');
now_GR.chooseWindow(2, 4);
now_GR.query();
while (now_GR.next()) {
  gs.info(now_GR.getValue('number') + ' is within window');
}

Comments

Popular posts from this blog

GlideRecord setValue

URL link in addInfoMessage