Incident's Active is not setting to false when Incident state is Cancelled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 01:47 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 06:03 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 06:25 AM
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
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 12:34 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 04:57 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2025 05:49 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader