Loading
Salesforce Mobile App Plus
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Offline Records Syncing

          Offline Records Syncing

          You can create records while offline and then sync them when back online.

          Required Editions

          Setup for Mobile Offline available in: Lightning Experience
          User Permissions Needed
          To use Mobile Offline Mobile Offline for Salesforce Mobile App Plus

          LWCS that you build can:

          • Import and use the offline-capable createRecord from lightning/uiRecordApi.
          • Use lightning-record-edit-form as in the Starter Kit example.

          If you have an LWC quick action that is named <objectApiName>.create, the Offline App gives it special treatment. It includes that Object in a list that appears when the “+” button in the top right of the screen is tapped.

          For example, in the starter kit, there’s an Account.create quick action that points to the createAccountRecord LWC. When the “+” is tapped, Account appears as an option for a record to create.

          Whether a user is offline or online, records created with this approach are created as local drafts, which are then synced to your org when the device is online. If the device is offline, pending new and edited records are saved as drafts in a queue.

          What are drafts?

          When records are created, updated, or deleted in the Offline App, each data change is recorded as a “draft” and queued to be synced back to your org. This draft process happens whether the mobile device is online or offline. When online, the app syncs drafts immediately. Otherwise, syncing resumes when the device comes back online.

          When online with a good network connection, there’s no visible difference between directly editing records in the standard Salesforce Mobile App experience and syncing changes via drafts using the Offline App.

          Drafts are typically created by either using a <lightning-record-form> to create or update a record, or by explicitly calling the @wire adapters for createRecord, updateRecord, or deleteRecord.

          How are drafts synced?

          When a network connection is restored, the draft queue activates and attempts to sync draft records in the same order in which they were created. Changes in a draft record are applied at the time the draft is synced to the Salesforce service. This process applies to system-maintained fields such as created and last modified dates, and can affect other behavior, such as features implemented in triggers. Where it’s important to preserve data specific to actions performed on the mobile client itself, Salesforce captures that data in custom fields at the time of draft record creation, modification, and deletion.

          Note
          Note Drafts are synced without detecting version or conflicts with data on the server. When a draft conflicts with other edits on the server, the result can depend on when the mobile user comes back online and syncs the draft. The last change to be applied to the service always wins.
           
          Loading
          Salesforce Help | Article