Synchronization.Send methodOfficial Content

Syntax

&SynchResult = Synchronization.Send()

Where:

&SynchResult is a Numeric variable.

Description

This methods sends to the server the pending modifications performed on the local database. All these modifications are stored as events in the GxPendingEvents table in the device local database.

Note: only changes made via a Business Component are sent to the server.

Once the Send process finishes, all pending events which have been successfully applied in the server are removed from the GxPendingEvents table, as in contrast, all events which could not be applied in the server stays still in the GxPendingEvents table and, all their status are changed into "RejectedServer".
The SynchronizationEvents external object has methods to query the pending events as well as any synchronization error.

Type returned

Returns one of the following values:

Send message code Send message Send message causes
0 Send OK. Data has been successfully sent.
1 Error opening transactions. Some error has occurred while opening the transactions.
2 Unknown error. Unknown error.
3 Replicator not found. The application could not found the replicator. Try checking if the Services URL property is OK or test if the replicator services are well published.
8 Send is already running Replicator will not be executed because another Send is already running

Example

An example of calling the Send method when pressing a button:

Event "MyAction"
    &SynchResult = Synchronization.Send()
EndEvent

Scope

Objects Smart Devices objects
Platforms Android, Apple iOS

Availability

As from GeneXus X Evolution 3

See also

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.