Versions Compared

Key

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

...

  • singleObjectSyncEnabled: Set to true to run a single object sync. This syncs a single (or root) object at minimum, but by default will retrieve all objects at one level above (parents) and one level below (children) the root object.

    • rootObjectId (required): The Id of the specific record you'd like to sync.

    • parentIdFieldList (optional): A list of reference type field names on the root object to also sync. If not specified, all objects referenced in all reference fields will be synced (for those object types already being synced). To disable this, you may specify a single invalid field (e.g. ["NONE"]).

    • childRelationshipList (optional): A list of child relationships on the root object to also sync. If not specified, all child relationships are utilized to sync objects at this level (for those object types already being synced). To disable this, you may specify a single invalid child relationship (e.g. ["NONE"]).

  • pushChangesSyncEnabled: Set to true to run a push changes sync. This skips directly to the sync stage that pushes all local changes to Salesforce.

  • useComposite: Set to true to explicitly use the Composite API. Currently, this applies only to push changes sync.

  • useCompositeGraph: Set to true to explicitly use the Composite Graph API. Currently, this applies only to push changes sync.

Info

NOTE: For older Pulsar versions, the 'syncData' API request will register and de-register for sync notifications automatically, restricting sync notification responses to API-initiated syncs. With the release of versions 2.1.6 (Android and UWP) and 3.1.0 (iOS), 'syncData' will maintain its current behavior, but now sync notification handlers can also be managed separately, using the 'registerSync' API method (see below).

Code Block
languagejs
var request = { 
	"type" : "syncdata",
	"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 === "syncDataResponse")	{
		// successfully requested sync
	} else if (results.type == 'error') {
		 errStr = results.data;
		 alert('A problem occurred:\n' + errStr);
	}
});

...