How can I move an Incident to from Closed state to Cancel state

Chhavi Dixit
Tera Contributor

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

9 REPLIES 9

@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();

Hi @J Siva , tried with the same script, its updating other fields but state transition is not happening.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Chhavi Dixit 

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]

****************************************************************************************************************

J Siva
Tera Sage

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


Community Alums
Not applicable

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