Difference between revisions of "Synchronization"

From Resco's Wiki
Jump to: navigation, search
(Full vs incremental)
Line 30: Line 30:
* for selected entities (using Woodford)
* for selected entities (using Woodford)
* by the client (Setup form > Delete Data)
* by the client (Setup form > Delete Data)
Full synchronization of an entity is needed when you [[App_projects#Managing_entities|enable an entity]] in Woodford, or [[App_projects#Managing_fields|enable a field]] in an already enabled entity.
=== Foreground vs background ===
=== Foreground vs background ===

Revision as of 10:26, 8 August 2019

Wikipedia logo
Wikipedia has an article on the same subject:

Data synchronization is the process of establishing consistency among data from a source to a target data storage and vice versa and the continuous harmonization of the data over time.

In our case, consistency has to be ensured of the data stored on the CRM server and the data stored on a end user device using Resco Mobile CRM app.


When you synchronize your app for the first time, you basically download to the device a subset of the server database. This subset refers to the time instant when it was downloaded. (Or synced last time – hence the name LastSync time. Strictly speaking there is no LastSync time for the database as a whole. Instead, each table has its own LastSync time.)

Once you have the data on the mobile device, you can start using it – view, search, but also create, edit or delete. Of course, the same data items may be changed on the server, too.

The purpose of the synchronization is to

  • Download server changes to the client
  • Upload client changes to the server
  • Resolve eventual conflicts

CRM servers have large databases with a lot of data. Users of the mobile app usually need only a small subset of entities, and they don't need the full set of fields for each record.

Types of synchronization

When talking about data synchronization, we sometimes need to differentiate between its various types.

Full vs incremental

  • Full synchronization - Creating a copy of all server records on the client. This is used when you launch the mobile app for the first time.
  • Incremental synchronization - Server sends its changes to the client; client sends its changes to the server.

Full synchronization can be forced

  • for a new customization (using Woodford)
  • for selected entities (using Woodford)
  • by the client (Setup form > Delete Data)

Full synchronization of an entity is needed when you enable an entity in Woodford, or enable a field in an already enabled entity.

Foreground vs background

  • In foreground mode, the app displays progress dialog; users must wait until the synchronization finishes
  • In background mode, users can use the application freely during synchronization. When both the user and the synchronization process attempt to write to the database at the same time, users will be notified and they have to wait.

(Settings > Sync Login on/off)

Manual vs automatic

Manual synchronization is initiated by the app user by tapping the Sync button, or it can be launched via JavaScript.

Automatic synchronization can be periodic or triggered by app start or data change.

Automatic synchronization

Automatic synchronization is controlled by application settings. It can be triggered in several ways:

  • If AppSettings.AutoSyncAfterStart >= 0 // #seconds to wait before syncing after application start
  • If AppSettings.AutoSyncDelay >= 0 // #seconds since the last sync
  • If AppSettings.AutoSyncAfterChange >= 0 // #seconds to wait before syncing after data change
    Triggered by record change: Created/Deleted/Changed (when Save button pressed).
    Even NN-record creation/deletion (association/disassociation) triggers sync.
  • If AppSettings.SyncEmailOnSend==true:
    Email change triggers email sync (unless sync is already triggered) // Email-only sync = syncing only emails
  • When changing online <-> offline mode
    AppSettings.GoingOnlineMode // NoAction | AskUserToSync | WarnUserMustSync | ForceSync
    AppSettings.GoingOfflineMode // NoAction | AskUserToSync | WarnUserMustSync | ForceSync

Conditions for auto-sync:

  • Settings > Sync Login off
  • Password saved
  • No sync errors from previous sync

Servers involved in synchronization

Resco license server: iservices.resco.net

  • license
  • external user resolution
  • ApplicationVersionCheckService // "Update Available"

CRM data/customization:

  • Dynamics CRM
    • CRM4: ~deprecated
    • CRM5: Dynamics 2011/2015/365; Online / On premise
  • Resco XRM
  • Salesforce
  • (Oracle)


  • SharePoint
  • DropBox, Box, GoogleDrive, OneDrive
  • (Azure - attachments)


  • Exchange
  • Gmail