Synchronize

Last modified: September 30, 2026

Introduction

The Synchronize activity can be used to synchronize your data between your device and the server. The action has three modes, which are described below.

Synchronization Modes

All three modes perform synchronization in two phases: upload and download. For more information, see the Synchronization Behavior section below and the Synchronization types section of Offline Synchronization.

All Objects

Synchronize

The All objects mode synchronizes the entire local database. The server database is updated with the changes from the local database. The local database is updated with the latest data from the server, including the file contents.

The behavior of this mode can be configured through synchronization configuration.

Unsynchronized Objects

Synchronize

Using the Unsynchronized objects mode, all objects with changes committed to the offline database are synchronized. Information about objects deleted since the last synchronization is also sent to the server. For more information, see the Synchronization Behavior section below.

Selected Objects

Synchronize

The Selected object(s) mode synchronizes objects partially, based on a selection:

Synchronize

Using this mode, only the selected objects or lists are synchronized. Deleted objects cannot be synchronized using selective synchronization.

Synchronization Behavior

This section describes the behavior for the Unsynchronized objects and Selected object(s) modes.

In the Selected object(s) mode, if the set of objects selected for synchronization contains any objects that have not been committed yet, those objects will be skipped and thus not synchronized.

If the selected object has local changes, the following steps are performed:

  1. The server database is updated with the changes from local database.
  2. The local database is updated from the server database. This is useful in case the selected object has calculated attributes or has been modified in a before/after event handler microflow.

If the selected object originated from the server (not created on the device), and no longer exists on the server (or is inaccessible due to the access rules), the local changes are not applied and the object is removed from the local database. In this case the value of the variable in the nanoflow for that object becomes empty. The server stores the discarded changes in the System.SynchronizationError entity to prevent data loss.

If the set of objects selected for synchronization contains objects without local changes, synchronization updates the local copy from the server database. If there is an object that has been deleted from the server or is no longer accessible due to access rules, that object will be removed from the local database too.

Background Synchronization

In Mendix version 11.15.0 and above, synchronization actions can run in the background, allowing users to continue working without waiting for synchronization to complete. Previously, this required additional steps to avoid blocking the nanoflow. Now, the Synchronize activity runs without blocking by default—no extra configuration is needed.

Behavior during Background Synchronization

  • Concurrent synchronizations are not supported.
  • Reading offline objects or files while a synchronization is running is safe.
  • Creating, updating, or writing offline objects and files is safe during background synchronization but may temporarily fail if the operation conflicts with an in-progress synchronization. Use error handling in your nanoflow to handle these cases.

Background Synchronization Before Mendix Version 11.15.0

In versions of Mendix before 11.15.0, avoid running synchronization processes in the background. For example, do not schedule periodic refreshes at fixed intervals. This approach can reduce application performance and result in unclear or misleading error messages for users.

Instead, you can trigger synchronization explicitly when data updates are required. Ensure that users are informed of the synchronization status by displaying progress indicators or relevant feedback during the process.

Properties

The Synchronize activity properties consists of the following sections:

Synchronize Action Properties

Action Section

The Action section of the properties pane shows the action associated with this activity.

Common Section

For more information on properties in this section, see Common Properties.

Limitations

Parallel Synchronization

Running multiple synchronization processes at the same time is not supported, regardless of the synchronization mode.

If you try to trigger another synchronization process while the synchronization is in progress, the following error message will be shown: "Performing simultaneous synchronizations is not supported. Please try again after the current synchronization is completed."

Such an error can be handled in the nanoflow from which the synchronization attempt was triggered using error handlers.

Read More