Find or update a ticket
var gr = new GlideRecord(''); gr.addQuery('sys_id', ''); gr.query(); if(gr.next()){ gs.print('Number: ' + gr.number); gr.substate = ''; //gr.update(); }