-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.Application.synchronize
rescocrm edited this page May 15, 2023
·
9 revisions
Starts background/foreground sync if not synchronized or the last sync was before desired limit.
Argument | Type | Description |
---|---|---|
backgroundOnly | Boolean | if true, only the background sync is allowed; otherwise it can also run the foreground sync. |
ifNotSyncedBefore | Date | Defines a time limit required for the last sync. Starts the sync only if wasn"t done yet or if it was before this limit. If it is null or undefined, sync is done always. |
This example demonstrates how to initiate the application synchronization.
// Following line initiates immediate foreground synchronization.
// If required "Sync login" is active, it causes all forms being closed and "Sync Login" form is being shown.
MobileCRM.Application.synchronize(false);
// Following line initiates the background synchronization, if the last synchronization was performed before given Date.
// It requires "Save password" being active and "Sync login" inactive
MobileCRM.Application.synchronize(true, new Date("Dec 25, 2017"));