Incident's Active is not setting to false when Incident state is Cancelled

prasannasun
Tera Contributor

I am not sure what is happening in my environment but when the incident state is cancelled  it is not making the incident to active false.

 

Vefified with OOB functionality not sure By default in OOB which one is setting incident active to false when cancel the incident.

 

verified mark_closed business rules but there is no differnce found in my code so not sure can anybody help me.

 

10 REPLIES 10

@prasannasun 

did you check if any flow is configured?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Abhijit4
Mega Sage

Hi @prasannasun 

 

There are 2 BR which are responsible for changing Incident Active flag:

1. mark_closed (On incident table) 

2. Task Active State Management ( On task table )

 

Please verify both BR. Also if you have written any custom BR/script which is having setWorkflow(false ) then it will stop these BR's from running which will lead to your issue.

 

If my response helped please mark it as correct.

 

Regards,

Abhijit 

ServiceNow MVP

ServiceNow Buddy Owner: snbuddy.com

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

prasannasun
Tera Contributor

Hi  Abhijit4,

 

Thank you for the info, I have verified the other Business rules which is related to task and compared the code with OOB and everything looks same  in our environment . I also verified if any custom business rules/scripts have this setWorkflow(false) and everthing looks good but not sure what is happening.

 

The thing is when we changed the state to closed then it is making inactive false but only for canceled it is not working. Verified all the flows and workflows but still no use not sure for one it is working for cancelled only it is not working

zee15
Tera Contributor

Hi @Ankur Bawiskar & @Dr Atul G- LNG 

I created a fix script to cancel incident records and used setWorkflow(false) within the script. When I executed it, the incidents were marked as "Cancelled," but they all remained active due to the setWorkflow(false) setting.

Now, I'm trying to set the active field to false, but it’s not working. Even when I manually or by script try to update the field, it automatically reverts back to true.

Could you please help me understand what might be causing this behavior? Also, what would be the correct way to make all these incidents inactive now, considering they are not updating through script or manual change?

Thank you for your help

@zee15 

Could you post a new question and share all the details there along with screenshots, scripts?

Tag me there as this is an old thread.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader