Set up tracked objects and follow sync habits that keep device counters current and prevent duplicate record numbers during fresh installs or device restores.
Required Editions
| Available in: Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled. |
| User Permissions Needed | |
|---|---|
| To keep system numbers in sync: | CGCloud Mobile Sync Admin |
Because the device produces numbers, the app keeps the server informed.
On each sync, the device uploads the records it created together with its advanced counter, so the server's counter stays current.
Only on the first sync of a fresh install does the device download the counter value from the server. Every later sync leaves the local counter unchanged. From then on, the counter flows only from the device to the server, not from the server back to the device.
Per-device counter record
Each device keeps its own counter for each system number definition it uses, one counter record per definition, per device. The device creates this record itself. The first time it generates a number for a definition, it creates the counter record locally and advances it from there. You don't need to create these records on the server in advance. The device makes and owns them, and it uploads them on sync.
- Set Up System Number Tracked Objects for Offline Sync
For numbering to work offline, set up the objects as tracked objects, and turn on data download for each one so the device gets its records.