The cover open count is incorrect; it is -1

when I tried to resolve a child case with pxForceCaseClose, I see error

“The cover open count is incorrect; it is -1”

It’s strange that another case type/child case type paire in my application, no such issue

May I know what’s the possible reason?

I compare the setting of the two case types/child case types, no key difference found.

Thanks.

@MaxonL16591286

We have encountered this issue when the child case is reopened and subsequently resolved, resulting in pxCoveredOpenCount being -1.

@MaxonL16591286

It happens rarely when the parent-child relationship is lost. Do you have any functionality where at a point in the flow of the parent case, the process is moving forward the child case and vice-versa?

@MaxonL16591286

Found two solutions

  1. add a resolution stage to set case status to Resolved-Withdrawn, then, go to this stage to withdraw case iso calling activity

  2. in child case type, call pxForceCaseClose on page pyWorkCover (defined as parent case type class) to withdraw parent case, then, child case itself will be auto withdrawn too