Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Mobile device synch fails with Mobile 7.2

SA-29932

Summary



User is facing issue with the sync in Android phone. Mobile device sync is failing very often and even sync does not work on re-login.


Error Messages



Synch "FAILED"


Steps to Reproduce



1. Install freeHC app mobileapp for application on android or iPad.
2. Launch application.
3. Open any WorkObject from  job list.
4. Perform some action. Observe sync Failed message top corner of  the screen(issue is very sporadic).


Root Cause



Here’s the explanation for the reported behavior based on the logs provided:

There is one issue while running an activity which in turn calls pxRetrieveReportData.

While calling this report definition, the required parameters are going empty pyReportName and pyReportClass.

pyReportName and pyReportClass are set in Step 1 and 3 of activity but they are when condition on them.

So when those two when conditions fails, pyReportName and pyReportClass will remain empty.

With these empty values Obj-Open (Step 5) of pxRetrieveReportData will fail. This could be one of the reasons for the sync failure.

Resolution



Local-Change is to make sure that while the Activity is ran during the delta sync, pyReportName and pyReportClass should have proper values.

Current the applications filters are not working in offline as they are calling data transform on refresh section when the filter is changed. But data transforms are not supported in offline.

There are two solutions:

Solution 1:

User can call an activity from the javascript and call the data transform from that activity and fire a delta sync from the javascript.

After the sync is done they should get the proper results. Following is sample to call an activity from javascript.

User has to call the following javascript function on filter change through run script action:

function setFilter() {

var metadata = {
"action": "callActivity",
"activityName": "pzFlushDatapage",
"className": "@baseclass",
"parameters": []
};
var data = {};

window.launchbox.PRPC.ClientStore.addAction(undefined, undefined, JSON.stringify(metadata), JSON.stringify(data), function () {
// Success
console.log("Action success");
pega.offline.DataSync.start();
});
};

Solution 2 (Recommended): Use a data page for getting all the results and perform client side filtering on changing the filters.

 
Suggest Edit

Published November 15, 2016 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us