pxForceCaseClose not working on embedded Pages
Hi,
I am using PE8.1.
Trying to use pxForceCaseClose to mark the case as resolved.
Below are the steps of activity:
1. Obj-browse to create a page list (tempPage) of open Work instances
2. For each embedded page (tempPage.pxResults), call pxForceCaseClose activity
Activity completes successfully but Status is not Changed to "Resolved-Completed" (as passed when calling pxForceCaseClose)
Note : pxForceCaseClose works fine if you pass a single WorkObjectID and pyStatusWork is updated as expected but it doesnot work with embedded pages
Also note : I have looked into below link ( which talks about hotfix for Version7) but I am using 8.1
https://collaborate.pega.com/question/how-forcibly-close-all-open-cases-system
Can someone please advise?
Screenshot of activity and tracer attached.
As you might be aware, when you loop through a page list, the steps inside the loop automatically inherit the page from the list as their step page. That is the page that will be passed to pxForceCaseClose & which it will reference as it's Primary page in its step 4, when it is checking if the current work object is what is being closed. If your pagelist is a set of pzInsKey then step 4 will test true, even though it is actually not so.
If the operation works when you are not in a page list, then you might try explicitly setting the step page of the pxForceCaseClose step to Primary or Top in your loop, so that you run that step in a similar context as if you were not in the loop.
The following is a good review of page names:
https://community.pega.com/sites/default/files/help_v55/concepts/concepts2/pagenames.htm