var gr = new GlideRecord('change_request'); gr.addQuery('state', '-1'); gr.addQuery('number', 'CHG0030780'); gr.query(); while(gr.next()) { gr.state=3; gr.close_code='successful'; gr.close_notes='Closing this change manually due to known error'; gr.setWorkflow(false); gr.autoSysFields(false); gr.update(); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter