- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 12:38 PM
I need to force cancel a change request, is there any script to it & where to run it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 02:12 PM
change.setWorkflow(false); before your update(); statement.
var change = new GlideRecord('change_request');
change.get('<sys_id of change>');
change.setWorkflow(false);
change.state = 4;
change.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 12:22 PM
If you want to delete it:
var change = new GlideRecord('change_request');
change.get('<sys_id of change>');
change.deleteRecord();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 01:21 PM
Hi Mike,
After running the script I get an error:
Operation against file 'change_request' was aborted by Business Rule 'Check if CI has valid AG & SG^ae9dee2b6f760a80fd2230444b3ee4f8'. Business Rule Stack:Check if CI has valid AG & SG
Background message, type:info, message: <p><span style="color: #ff0000;"> Submit aborted. An Approval Group and a Support Group are required for Change Request.</span></p>
*** Script: change_request
Please help. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 01:28 PM
Actually, I want it force closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 02:12 PM
change.setWorkflow(false); before your update(); statement.
var change = new GlideRecord('change_request');
change.get('<sys_id of change>');
change.setWorkflow(false);
change.state = 4;
change.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 03:00 PM
Thanks a ton. U r a Saviour