- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 06:39 AM
When closing an HR Case, all Child cases are being set to Cancelled. Can someone direct me to what is setting the State of the Child cases as we would rather have them follow the identical state of the parent.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 11:18 AM
Hi Kevin!
The Cancel or Close Case Cleanup Business Rule runs when the state of an HR Case changes to Closed Complete, Closes Incomplete, or Cancelled. In there, it calls the cleanupChildRecordsForCase method in the hr_utils script include. That method contains the script that sets child cases as cancelled when a parent case is closed.
I hope this helps!
Holly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 06:57 AM
Hi Kevin,
check any after update business rule on hr case table which might be querying the child cases and updating that
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 07:44 AM
Hello Kevin,
Along with checking on your Business Rules like Ankur suggested. You can also check out a Business Rule called 'Allow Parent for closed child cases'. The script is meant to allow for safe closure to child cases when the parent case is being transferred. Otherwise, it will abort the action of closing the parent case IF the child case is still in an active State.
Ours is currently set to 'inactive' - but once I made it active, the parent case was not able to move from awaiting acceptance to close complete, while a child case was still in an active state.
If yours is also set to inactive, you may just want to activate it and run a test to make sure it works as intended, and as you need.
Let us know if this helps!
Cheers,
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 11:18 AM
Hi Kevin!
The Cancel or Close Case Cleanup Business Rule runs when the state of an HR Case changes to Closed Complete, Closes Incomplete, or Cancelled. In there, it calls the cleanupChildRecordsForCase method in the hr_utils script include. That method contains the script that sets child cases as cancelled when a parent case is closed.
I hope this helps!
Holly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 05:57 AM
This is exactly what I was looking for. Thanks, Holly!
For others that stumble on this, I was able to bypass the Child Cases from being set to Cancelled by creating a seprate Business Rule with a higher order than 'Cancel or Close Case Cleanup'. This allowed the OOB scripts to remain intact while allowing me to achieve our objective.