Skip to main content

Triggering Syncs

What makes a record eligible to sync up from mobile?

Ultimately, you can control syncs with scripts, but what GoZync does out of the box is either sync a single record when you pass its ID to the script "Zync It - This Record ( RecordID )" in your mobile file, or syncs "all changed records" in the whole table/file when you call the other "Zync It..." scripts.

So what's considered a changed record? Any parent record where the field gz_Send is set to 1. (That's one of the fields you pasted into your solution during integration.) You'll see that the auto-enter definition of that field takes care of any instances where that parent record is modified.

But what if you only modify a child record, such as change a line item on an invoice?

In that case you need to add a script trigger which also modifies the parent record. The easiest way to do this is to add a layout-level script trigger that runs OnRecordCommit. Have this trigger call a script that sets the field gz_ModTimeStamp in the parent record (the invoice in this case) to 1. Then add a second line to your script: call the Exit Script step with a script result of 1. More on this here: triggering record mods.

What if you only want to send "completed" records, not just records you modified but perhaps haven't finished yet?

No problem: learn how to flag records to sync here: pushing found sets.

What makes a record eligible to sync down from the hosted files?

GoZync will sync any records that match your filter criteria and have been changed since your last sync. Learn about filter criteria here: downloading found sets.