How can I move an Incident to from Closed state to Cancel state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:36 AM
Hi Everyone,
Greetings for the day!
How can I move an Incident to from Closed state to Cancel state.
I am trying to do this via Fix script, its throwing a message 'Invalid state transition'.
Can you please help me with the script.
Best Regards,
Chhavi Agnihotri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:55 AM
@Chhavi Dixit If that's case, then try th below script.
var rec = new GlideRecord('incident');
rec .get('RECORD SYS ID');
rec .setValue('state', 8);
rec.setWorkflow(false);
rec .update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 03:00 AM
Hi @J Siva , tried with the same script, its updating other fields but state transition is not happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:42 AM
It’s not possible, and also, why would you want to move a closed incident to the 'Cancelled' state? This is not recommended.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:47 AM
Hi @Chhavi Dixit
It's not a best practice to move the closed incident to the cancelled state an dthere's no OOB feature to do so.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:47 AM
Hi @Chhavi Dixit ,
As Atul mentioned this is not a best practice to move Closed incident to Cancelled state.
What is your use case or business requirement?
Regards
Anand