About GeodatabaseSyncTask::syncErrors property

1042
0
12-22-2016 12:03 AM
tanerkoka1
Occasional Contributor

Hi,

-Why do we use  syncErrors propery?  İf Sync is complated (Enums.SyncStatusCompleted)  why am I using  this syncErrors property  like below link?

 Sync offline edits—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

-We are using Arcgis Runtime SDK for Qt 10.2.6 and Qt 5.4.2 (MSVC 2013, 32 bit) Qt Creator QT\QML side We have local editing application which edits features within an offline geodatabase and sync back to the service.We are using GeodatabaseSyncTask class's generateGeodatabase (GenerateGeodatabaseParameters parameters, string filename) method to generate geodatabase and then we sync editings with syncGeodatabase(SyncGeodatabaseParameters parameters, Geodatabase geodatabase) method.

-We have sync problems sometimes in application , sometimes some features did not sync back to the service. Can we solve with this problem with  syncErrors propery using (error.layerId ,  error.objectId,  error.globalId, error.editOperationString ) like below:

if (syncStatus === Enums.SyncStatusCompleted)

{

console.log("Sync completed")

var errorString = "";

for(var key in syncErrors) {

for (var j = 0; j < syncErrors[key].featureEditErrors.length; j++)

{

var error = syncErrors[key].featureEditErrors;

errorString += "\nLayer Id: " + error.layerId + "\nObject Id: " + error.objectId + "\nGlobal Id: " + error.globalId + "\nEdit operation: " + error.editOperationString + "\nError: " + error.error.description;

 

}

}

console.log(errorString);

}

Best Regards

Tags (1)
0 Kudos
0 Replies