Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The syncinfo query returns the following information about the last Pulsar sync:

  • Last Previous Sync Attempt Date/Time

  • Last Successful Sync Date/Time

  • Last Failed Sync Date/Time

  • Last Sync Success

    • Returns YES if the last sync was successful, and returns NO otherwise

  • Last Sync Duration

    • Number (#.#) of seconds that the sync took

  • Sync Generation

    • Number of total sync passes since app was installedĀ 

  • Sync Pass Count

    • Number of passes that were performed with the last sync

  • Sync Domain Type

    • all = standard initial or catchup sync,

    • mini = catch-up sync with a subset of objects,

    • single = a sync that at minimum syncs a single object, but can also sync up to one level above (via parent/lookup relationships) and one level below (via child relationships)

    • push = a sync that only pushes local changes to the server.

  • Sync Window Type

    • initial = The first sync performed after installing the app.

    • catchup = Any sync that is performed after the initial sync and is not a complete sync.

    • complete = A sync that is not an initial sync, but is performing a full sync due to a setting change.

  • Sync Resumed

    • Returns YES if the last sync was a continuation of an incomplete sync, and returns NO otherwise

  • Schema Changed

    • Returns YES if the last sync detected a schema change and performed a schema migration, and returns NO otherwise

  • Refresh Performed

    • Returns YES if the last sync resulted in refreshing the session and settings before sync began, and returns NO otherwise

  • Refresh Duration

    • Number (#.#) of seconds that refreshing the settings and session took

  • Metadata Sync Performed

    • Returns YES if the last sync performed a metadata sync, and returns NO otherwise

  • Metadata Sync Duration

    • Number (#.#) of seconds that the metadata sync took

  • Reachability Sync Performed

    • Returns YES if the last sync performed a reachability sync, and returns NO otherwise

  • Reachability Sync Duration

    • Number (#.#) of seconds that a reachability sync took

  • Server Processed Count

    • Number of full or partial records retrieved from the server for any reason

  • Server Integrated Count

    • Number of retrieved records ultimately added or updated on the local device

  • Local Created Count

    • Number of local created records sent to the serverĀ 

  • Local Deleted Count

    • Number of local deleted Ids sent to the server

  • Local Updated Count

    • Number of local updated records sent to the server

  • Local Updated Unique Count

    • Number of unique updated records sent to the server. This can be less than Local Updated Count if your organization has enabled the chronological changes feature.

...

Code Block
languagejs
{
    "type": "syncinfoResponse",
    "object": "",
    "data": {
        "lastfailedsync": "1970-01-01T00:00:00.000Z",
        "lastsuccessfulsync": "2023-06-01T04:10:55.020Z",
        "lastsyncattemptprevioussynctime": "NEVER_SYNCED",
        "lastsyncduration": "44.9",
        "lastsyncsuccess": "YES",
        "localchangespendingcount": "0",
        "localcreatedcount": "0",
        "localdeletedcount": "0",
        "localupdatedcount": "0",
        "localupdateduniquecount": "0",
        "metadatasyncduration": "9.4",
        "metadatasyncperformed": "YES",
        "reachabilitysyncduration": "0.0",
        "reachabilitysyncperformed": "NO",
        "refreshduration": "0.0",
        "refreshperformed": "NO",
        "schemachanged": "NO",
        "serverintegratedcount": "4304",
        "serverprocessedcount": "4485",
        "syncdomaintype": "all",
        "syncgeneration": "1",
        "syncpasscount": "1",
        "syncresumed": "NO",
        "syncwindowtype": "initial"
    }
}

...

Code Block
languagejs
var request = { 
	"type" : "syncinfo",
	"data" : { } // empty object- this is required in the current API
};

bridge.sendRequest(request, function (results) {
	console.log('Javascript got its response: ' + results);
    if (results.type === "syncinfoResponse")	{
		var lastsyncattemptprevioussynctime = results.data.lastsyncattemptprevioussynctime;
        var lastsuccessfulsync = results.data.lastsuccessfulsync;
    } else if (results.type == 'error') {
	    errStr = results.data;
	    alert('A problem occurred:\n' + errStr);
    }
});    

...