Primary may not solve the issue (it sometimes does). Using the caseInfo.content page can also solve the issue but the most common solve is using TOP.
TOP page
pyWorkPage was always a controversial practice… To refer to “pyWorkPage” you should be using TOP, this predates Constellation, but the stateless nature of Constellation means TOP is the only way to traverse from data level to your case level.
There’s a few examples of it in use, not with saveable datapages however they may help you.
- https://docs.pega.com/bundle/platform/page/platform/user-experience/validating-embedded-data-fields.html
- https://docs.pega.com/bundle/platform/page/platform/user-experience/marking-single-record-table.html
- https://docs.pega.com/bundle/platform/page/platform/user-experience/validating-total-amount-embedded-data-table.html
- https://docs.pega.com/bundle/platform/page/platform/user-experience/validating-unique-values-embedded-data-table.html