Once a record triggers a workflow, it keeps the original context version through the life of the flow. Only new workflow contexts created after you publish the change will use the new flow. When a new version of an existing workflow is published, the changes are not applied to running workflow contexts. Any currently running […]
Auto close standard change/incidents after 5 days
The following script can be schedule to auto close the standard changes/incidents after 5 days to auto close var changeGR = new GlideRecord(‘change_request’); changeGR.addQuery(‘type’, ‘Standard’); changeGR.addQuery(‘state’, 0); changeGR.query(); while(changeGR.next()) { var dif = gs.calDateDiff(changeGR.sys_updated_on, gs.nowDateTime(), true); gs.print(changeGR.number); if(dif >= 5*86400){ changeGR.state = 3; changeGR.comments = ‘Change Request […]