Automatic synchronization

From Resco's Wiki
Jump to navigation Jump to search
Synchronization

Automatic synchronization (auto sync) in Resco Mobile CRM is a background synchronization that kicks in either when you start the app, when you change the data, or after a defined period of time.

Enable auto sync in the app

Go to the Setup or Settings section of your mobile app and set the following parameters in the NETWORK block:

  • Auto Sync: Select when you want your app synchronized:
    • Never
    • On Start (app will synchronize every time it starts, even after it was running in the background)
    • On Change (app will synchronize with server after every data change)
    • On Start & On Change
  • Sync Login: Set to Off. This disables the synchronization screen, where you enter URL, name, and password.
  • Save Password: Set to On.

The on-start automatic synchronization is initiated at every app startup unless one of the following conditions blocks it:

  • Password is not saved
  • Sync login is required
  • The application was synchronized no more than 15 minutes ago
  • No network connection is active
  • There are some unresolved sync conflicts from the last sync (it is indicated on the Home screen)

Configure Woodford

Edit your app project and select Configuration from the Project menu.

  • Require Sync Login: Set to False.
  • Trigger Auto Sync: Set up when (if) should automatic synchronization be performed.

You can optionally configure additional conditions that trigger synchronization:

  • Auto Sync Interval: Set up a time period in seconds for automatic synchronization. For example, use 1200 to initiate auto sync when 20 minutes have passed since the end of the previous synchronization. Auto Sync Delay overrides the Auto Sync option and forces the background auto sync.
  • Sync before going Online / Sync before going Offline: Perform a synchronization before going into online or offline mode:
    • NoAction – Do not synchronize.
    • AskUserToSync – Offer the option to synchronize.
    • WarnUserMustSync – Require synchronization before continuing.
    • ForceSync – Force synchronization.

You have the option to Lock each field. If you do so, the users won’t be able to change these settings in their apps.

Force customization download

An update of the project customization cannot be launched during an automatic, background synchronization. When, during a background synchronization, the app discovers that there's a project update available, the sync button is replaced by a down-facing arrow button. Users can tap the button to start a manual, foreground synchronization that applies the update.

If a user does not trigger foreground sync manually, it will start automatically on application start. As soon as the metadata download (project update) is complete, the sync switches again to background mode, so that the user can start working with the app.

This feature requires that you enable automatic synchronization. Additionally, the option Background Download in Woodford's Configuration must be set to true.

In order for new customization to be applied, all local changes from the device must be uploaded to the server in order to maintain data integrity.

See also

Reference

The following table offers an overview of the related parameters.

Configuration label App setup label Description
Trigger Auto Sync Auto Sync Set up automatic synchronization. (Never, On App start, After entity form save action)
Auto Sync interval Synchronizes every X seconds even if no local changes were made. 0 means disabled.
Delay triggered sync after change (in Online mode) Delays triggered auto sync 10X seconds after a change is made in Online Mode. 0 means no delay; sync is triggered immediately.
  • Triggered by record change: Created/Deleted/Changed (when Save button pressed).
  • Even NN-record creation/deletion (association/disassociation) triggers sync.
Delay triggered sync after change Delays triggered auto sync 10X seconds after a change is made. 0 means immediately.
Sync before going Online Whether to synchronize before going into Online Mode: NoAction / AskUserToSync / WarnUserMustSync / ForceSync
Sync before going Offline Whether to synchronize before going into Offline Mode: NoAction / AskUserToSync / WarnUserMustSync / ForceSync