Can anyone please let me know how to pass parameters to create work OOTB functionality which is a supported control in offline mode. I have tried all the below Java script options but none of them seem to work. Thanks in advance to anyone willing to help.
var prop1 = pega.u.ClientCache.find('D_DisplayCaseInfo').get('DeliveryOption').getValue();
In the example above, I assume that you get alerts for "Test Value" and the prop1 value?
I suspect that pyWorkPage.Customer page property does not exist and that the last line is throwing a null pointer exception. Can you make sure pyDefault data transform is setting at least one property within the Customer page property. Then force a full sync and try again?
Another thought is that your example above would work as a data transform as a pre process on your first assignment shape. This may be more maintainable as it would be in the model.
I was able to fix this by converting the datapage to a requestor level datapage, and the values user enters in the UI is reflected to the datapage to be used across multiple threads. Then added the below js in context of a preflowaction of the first assignment of the screen flow.
var pyWorkPage = JSON.parse(pega.ui.ClientCache.find('pyWorkPage').getJSON());
If you use getJSON(), then doing an adoptJSON() is necessary as the JSON object is a copy.
However, if you did a find() to get the ClientPageAPI, then put() should have updated the value within the ClientCache. If you need to revert back to using the API instead of JSON for any reason, and have issues, please reach out.