Hi, I have 10 child cases for a parent case . I need to change the case status for some of the child cases to "XYZ"(just for example) , based on certain when condition . For that I am facing some issues while looping through the child class.
Approach that I am trying :
1. Loop through pxCoveredInskeys Value list and take the value in a Parameter (Param.ChildKey) , (to use them as pzInskey further for Obj-Browse ) .
2.In the same loop ,Use obj-browse(Giving class as child class) to fetch the child cases data based on pzInskey .(On a new page called ChildCaseData.pxResults)
3. Use obj-open-by-handle to acquire lock on every fetched record. (Based on a when condition , but lets ignore it for now)
4. Call pyChangeStage.
I am facing issues at Step 2 itself , when I am trying to loop over child case class and fetch details , it is showing only the last child case information under ChildCaseData that is ChildCaseData.pxResults(1) . However it should how all the 10 records.
Is there anything in the 1st 2 steps that is incorrect . OR should there be any other approach ??
Hi: @AnanyaA2, based on what i understand, this is expected. You are looping (first loop) pxCoveredInskeys to get one child key. For each child key, browse the record again - this will give only one record (which is the specific child case). loop through the results of Obj-browse (second loop) to open the case record.
If the above understanding is correct, can you try to exclude the obj-browse and try to open the case in the first loop itself?