var incidents = new GlideRecord('incident'); var subInc = incidents.addQuery('number', 'INC001020'); subInc.addOrCondition('number','INC001021'); subInc.addOrCondition('number','INC001022'); incidents.query(); while (incidents.next()) { gs.info('---> number: ' + incidents.getValue('number')); }
Use of addOrCondition in GlideRecord with Example ServiceNow
Working Code Asked question September 25, 2023