background script to change the assignment group of a closed incident (INC000234)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2017 02:57 AM
Hi All,
Can anyone help me on this?
Thanks in Advance.
Sachin
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2017 12:15 PM
var gr = new GlideRecord('incident');
gr.addQuery('number', 'INC000234');
gr.setLimit(1);
gr.query();
while(gr.next()){
gr.setWorkflow(false);
gr.setForceUpdate(true);
gr.autoSysFields(false);
gr.assignment_group = 'pass in sys_id of the assignment group';
gr.update();
gs.info("Incident updated:" +gr.number);
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks