Question
Data not updated in clipboard - pega.u.d.refreshSection
Hi, We have a custom control for submit. We have a step to refreshsection and then call activity using httpRequestAsynch.
Sometime, I could see httpRequestAsynch is executed before refreshsection which results in data not available in clipboard when activity executed.
Step 1: pega.u.d.refreshSection("SectionName","");
Step2: var theUrl = pxReqURI + "?pyActivity=Test-Class-Work.ActivityName&pzPrimaryPageName=Datapage";
var theResponse = httpRequestAsynch(theUrl,"",50,400);
Positive Scenario: Refreshsection happens first and the activity called. In this case, data entered in UI is updated in clipboard because of Refreshsection. When activity executed after that data is found in clipboard and processed correctly.
Failure Scenario: Activity called before refreshsection. Hence, data entered in UI is not available in clipboard which results in process fail.
Failure scenario happens rarely and not sure how this has to be handled. Pleas help
What version of Pega are you on? You may find a better OOTB approach to implement your requirement in the more recent versions of Pega.
Assuming that you need to stick to the current code, would it help if you delay the call to Step2 using setTimeout() method.
Thanks.