Vismit Ambre
Giga Guru

 

 

This is the result I got. I had limited the result set to 4 for testing.

find_real_file.png

var incidentGR = new GlideRecord('incident');
var oldDescription = '';
incidentGR.addEncodedQuery('stateNOT IN6,7,8');
incidentGR.setLimit(4);
incidentGR.query();
while(incidentGR.next())
 {
  oldDescription = incidentGR.description;
  incidentGR.description = incidentGR.description + '.';
  incidentGR.update();
  gs.log('Incident ' + incidentGR.number + ' has been updated. Old Description: ' + oldDescription + '. New Description: ' + incidentGR.description);
 }