I have a requirement to refresh the parent WO harness on close of Child WO harness.
The child WO harness replaces the parent WO and as soon as i close the child WO harness, the parent case re-appears but is not refreshed.
Can anyone help with this?
I already tried to run the follow script:-
var section = pega.u.d.getSectionByName('SectionName', '');
You could try a similar scenario under PegaSample and trace it to see how it works, in order to do it in a similar manner for your own application.
Specifically, set your workpool to PegaSample and click "app" in left margin of the developer portal to view the PegaSample app. Then, run the NewWork flow in the CustomerRequest class, which makes a cover, which is the parent. Use the "add work" in its menu to add a covered object, which is the child. Then start tracing and resolve the child, and see if the parent is refreshing the way you want it to, and if so, you should be able to tell from the tracer details how it is achieving the refresh.
Posted: 5 years ago
Posted: 10 Aug 2017 20:09 EDT
Abhishek Anand (Abhishek_Anand)
Barclays UK PLC
AVP- Pega Engineer
Barclays UK PLC
According to the business requirement, we don't resolve the child at any stage. The Child can be accessed through Parent by replacing the same document object and whenever the child is explicitly closed(a 'X' link on the header), the DOM points to Parent WO which was already loaded.
Although i've found a solution using two functions and a global variable:-
I am calling the function A just before the child wo gets created and function B on hover of the layout of the section that contains the details for the child cases refreshing only once when the user returns to the screen.
I've tested this with all the browsers and it works fine.
Also, i ran a preActivity to get the lock of the parent again using obj-refreshandlock whenever the user comes back to parent case so that there is no stale data and user should be able to perform other actions on the parent case immediately.