With the "Write" operation the clients can store changes that have occurred locally on the target database.

The pipeline of operations when you press the button is the following:


  1. On write click event is run (more info on the events here).
  2. After Upload event is run: when this event occurs, the client has already sent its data to the server. First of all, the server stores the whole compressed XML sent by the client in its own log table and subsequently populates a temporary table denormalizing the XML, that we will call FlatTable. If there is a procedure associated with this event, it can discover the name of this temporary table by using the activity GetExecutionReason and, in necessary, edit the data in it. The columns of this temporary table have logical names.
  3. Before Write event is runthe server has carried out a diff between the FlatTable and the data on the target tables and has written the result in a table called DiffTable. The DiffTable contains the modified or new records only; the content of this table will be written on the final tables. It is possibile to include normalization logics of the content of the DiffTable to a Procedure associated with this Event. If there are no modifications to data, this table will be empty. The columns of this temporary table have the logical names.
  4. After Write event is run: the server has written data and it is possibile to insert some compensations/logging logics here.


For a more practical example, please see the How to - Add validation rules article.