HR Child Cases being Set to Cancelled

kevinthury
Tera Guru

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.

 

 

1 ACCEPTED SOLUTION

hollysnyder
Mega Guru

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

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

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

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

Rob Sestito
Mega Sage

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

hollysnyder
Mega Guru

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

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.