GlideElement – nil()
Determines if the field is null, applicable only to the elements of glideRecord object.
Returns true if the field is null or an empty string, false
var glideRecord = new GlideRecord('incident'); glideRecord.query('priority', '1'); glideRecord.next(); gs.info(glideRecord.state.nil());
Use of nil() in ServiceNow.
Working Code Asked question April 12, 2024