Synchronization steps: Difference between revisions

Jump to navigation Jump to search
Line 18: Line 18:


== Uploading local changes ==
== Uploading local changes ==
Right in the beginning, the app uploads local changes to the server. This makes sense; even if later phases of synchronization fail, server will have received all changes and thus be up to date.


The application logs all changes of the local database to two special tables:
The application logs all changes of the local database to two special tables:
Line 23: Line 25:
* <code>rs_changelognn</code> - changes in relationship tables
* <code>rs_changelognn</code> - changes in relationship tables


Entities are sorted before upload, so that forward references are minimized. This is not always possible, for example in case of circular references. So, whenever possible, we upload parent records (quote, invoice...) before child records (quotedetail, invoicedetail...).  
Entities are sorted before upload so that forward references are minimized. This is not always possible, for example, in case of circular references. So, whenever possible, we upload parent records (quote, invoice...) before child records (quotedetail, invoicedetail...).  


{{Note|By modifying ChildParentMap (i.e. adding new parent-child relation) you can influence the upload order.|Tip}}
{{Note|By modifying ChildParentMap (i.e. adding new parent-child relation), you can influence the upload order.|Tip}}


Records within an entity are uploaded sorted either by creation date (Woodford [[Configuration]]: '''Chronological Upload Order''') or by last modification date (default).
Records within an entity are uploaded sorted either by creation date (Woodford [[Configuration]]: '''Chronological Upload Order''') or by last modification date (default).
Line 38: Line 40:
** As of [[Releases/Autumn_2020|release 13.2]], this special behavior for the status field only applies to Account entities and all parent entities. Other entities are unaffected. You can disable this behavior using per entity; see '''Upload Status with Data''' below.
** As of [[Releases/Autumn_2020|release 13.2]], this special behavior for the status field only applies to Account entities and all parent entities. Other entities are unaffected. You can disable this behavior using per entity; see '''Upload Status with Data''' below.
* We may create a new record on the server, but do not get any confirmation. Next time we try to re-create an existing record. Similar problem can happen for record update.
* We may create a new record on the server, but do not get any confirmation. Next time we try to re-create an existing record. Similar problem can happen for record update.
* Some entities such as quote require special processing
* Some entities, such as quote, require special processing.
* [[Conflict resolution|Conflicts]]
* [[Conflict resolution|Conflicts]]
** We may update server record that was meanwhile deleted on the server.
** We may update server record that was meanwhile deleted on the server.
Line 66: Line 68:
* Conflicts
* Conflicts


In case of upload problems, SyncErrorsForm opens in the application:
In case of upload problems, the [[Sync Errors]] form opens in the application:
* It presents all upload problems (incl. conflicts).
* It presents all upload problems (incl. conflicts).
* It allows users to resolve the conflicts.
* It allows users to resolve the conflicts.

Navigation menu