Skip to main content
Grupo

LWC Offline for Salesforce App Plus

Welcome to the LWC Offline pilot for Salesforce app! We're happy to have you on board this program in our journey to bring LWC Offline to the Salesforce Mobile app. Use this group to ask questions, access important resources (see sidebar), and view important announcements.

Hello Team,  

 

We have a requirement where we need to override the Home Page for Offline Application and show the Custom LWC to show some list of Records based on criteria and also support the component for offline access. 

We have already created a Breifcase for that object. 

Any code snippet of landing page json file would be appreciated 

Thanks  

 

In Addition to this I have created a Quick Action in which I am using Lightning-input to get the data and updating the data in using JS File locally, but as soon as the UI update happens the Mobile Screen becomes completely white screen. 

 

I tried to debug the code (using Toast Message) and I am able to get the value in JS file and only the screen get white. 

 

@Irfan Syed @Adam Liechty @Amber Craig @Ashwin Nair

1 respuesta
0/9000

Since Task object doesn't support LWC quick actions, is there any alternative way to view task in the Offline App (except creating a custom object) ? 

1 respuesta
  1. 18 nov 2025, 16:57

    Hi @Archisman Ghosh

     

    No — you cannot view or work with standard

    Task records in the Salesforce Offline App, because the Task object is not supported for offline access and also does not support LWC Quick Actions. There is no native alternative other than using a custom object. 

0/9000

Hi All, 

 

We're developing an app using Salesforce Mobile App Plus, and we've encountered an issue with data and metadata refresh. Whenever we update or deploy elements like Lightning Web Components (LWC), labels, or object configurations, the users are required to manually refresh the cache or even re-login to see the changes.

We're looking for a way to programmatically or systematically trigger a full refresh — ideally including both the cache and Briefcase sync — in one action to avoid manual steps after such updates.

Does anyone know if Salesforce provides a mechanism for this? Or maybe someone has implemented a workaround, automation, or custom logic to handle this more smoothly?

Any tips or best practices would be greatly appreciated.

Thanks! 

CC

@Irfan Syed

6 respuestas
  1. 26 ago 2025, 6:18

    This is disappointing to see as we faced a very similar issue with a Salesforce 1 app that prevented us from adopting. These kinda issues are deal-breakers as user either won't perform the additional steps or will quickly get frustrated at being told to log in/ out after every new release or bug fix. 

    https://salesforce.stackexchange.com/questions/113961/salesforce1-lightning-component-not-refreshing-after-content-changed

0/9000

Hi everyone, 

We are currently working on developing an offline-capable Lightning Web Component (LWC) that displays related records of Object A on the detail page of Object B. The goal is to ensure that users can view and interact with these related records even when they are not connected to the internet.

Approach 1: Using GraphQL

Initially, I explored using GraphQL to fetch the related records. However, I encountered performance issues when the number of records exceeded 10. The response times became noticeably slower, which is not ideal for an offline experience.

Approach 2: Implementing Cacheable Apex

To address the performance concerns, I transitioned to using a cacheable Apex method. This approach improved performance by leveraging client-side caching, allowing for faster data retrieval. However, I faced a new challenge when attempting to update records using the updateRecords function from Lightning Data Service (LDS).

Issue with updateRecords in Offline Mode

When operating in offline mode, I observed that only 1 or 2 related records were being updated, despite the intention to update all 4 related records. This inconsistency in behavior suggests that the updateRecords function may not be fully compatible with offline scenarios, possibly due to limitations in how LDS handles data synchronization when offline.

Request for Guidance

I am seeking advice on how to effectively implement offline support for updating related records in LWC. Specifically, I would appreciate insights into:

  • Best practices for using LDS's updateRecords function in offline scenarios.
  • Alternative approaches for updating related records offline, such as utilizing the Mobile SDK's entity framework for offline data management.
  • Recommendations for ensuring data consistency and synchronization when transitioning between online and offline states.

Any guidance or resources you can provide would be greatly appreciated. 

Please let me know if codebase files are needed here.   

 

@Irfan Syed, @Adam Liechty, @Amber Craig, @Ashwin Nair, @Saket Agarwal

5 respuestas
  1. 19 may 2025, 6:09

    @Olajide Otolorin -Prince There is a Question object which is related to Object A. Now, I want to show the Question object records on the view of Object A, in edit mode, so that the user's responses can be saved.

    Currently, I’m using updateRecords from LDS to save the data, but it's behaving weirdly — sometimes it saves 1 record in the draft, sometimes 2 or 3 — even though I’m trying to update 5-6 records at once. The same code works fine online. Is there any workaround for this?

    I’m fetching Question object data using a cacheable Apex method via a wire call in the LWC that is placed on the Object A

    record page. 

    Below is the code snippet of updateRecord lds  

    const savePromises = updates.map(recordInput =>

              updateRecord(recordInput).catch(error => {

                  console.error(`Failed to update ${recordInput.fields.Id}:`, error);

              })

          );

      

          Promise.all(savePromises)

              .then(() => {

                  this.showToast('Success', 'All inspection answers saved.', 'success');

              })

              .catch(error => {

                  console.error('Save failed:', error);

                  this.showToast('Error', 'Some records failed to save.', 'error');

              });

0/9000

Hi Everyone, 

 

We have developed an LWC for View Account Record for Salesforce Offline Mobile and inside that LWC, we have given a button to basically create a record of Another Object. When we click on that button, a lightning-record-edit-form is displayed and inside that form, there are many lightning-input fields where the user can enter values to create record. 

 

Inside the lightning-record-edit-form, we are doing conditional rendering i.e based on the value that the user enters in a lightning-input picklist, we are displaying certain lightning-input fields. 

 

Now this whole thing is working smooth as butter when the App is in online mode. But when I go offline, i am getting certain errors. These errors are not persistent but occur randomly. What I am guessing is, after the records are synced, if we do a complete run through of the LWC in online mode, then it seems to work fine in offline but as I mentioned this is not the only scenario. 

 

So for some reason, LWC priming is not happening correctly because Records are getting synced and I am able to access them, So there must be some issue with the LWC but I'm unable to pin-point the issue. 

 

I have checked all the things like Briefcase Builder, Access to all the fields, Quick Actions etc and everything is done as per the Salesforce Mobile Offline documentation. 

 

Some Help here will be highly Appreciated ! 

 

Please Note:- For the Second Screenshot, The Error reads as 

"type: unspecified, message: /services/data/v63.0/ui-api/record-defaults/create/Object__c could not be reached"

1 respuesta
  1. 6 ago 2025, 14:52

    Although I don't know the details of this LWC's implementation, it's possible the conditional rendering could be the source of the problem, if any component (custom or standard) both 

    1. Is conditionally constructed AND 

    2. Includes @wire of any data that needs to be primed 

     

    The Komaci static analyzer for priming does not follow anything dependent upon @track / runtime variables. If any data *may* be needed based on runtime conditions, it can't be behind any runtime conditions. 

     

    Likely, when your user runs through those conditions while online, it is filling the cache with data that was *not* primed initially, making things work after going offline.

0/9000

Hi there, 

We are facing problems querying records that are cached but have never been accessed by the user while online. Currently, we are using GraphQL to retrieve the data. 

 

While offline, all records are accessible through the native "Offline Records" page. However, they are not accessible through the custom LWC, which uses GraphQL. 

 

What should we do to retrieve these cached (briefcase downloaded) and previously not accessed records using an LWC? 

 

-- 

 

Steps to reproduce: 

 

Step 1

 

There is a custom object with three related records synchronized and accessible while offline. Those records were opened in the past while online.

Problems querying cached records in LWC

 

Step 2 

Create a new related record on the desktop. Record RDM-80865 is created under its parent EDM-16645.02 - Create a New Related Record on Desktop.png

Step 3 

Synchronize the records on mobile. Records primed.03 - Synchronize the Records on Mobile.png

 

Step 4 

Turn off the connection and open the Parent Record (EDM-16645) through the LWC. The related records list does not load. Why?04 - Become Offline and Open the Record, the Related Records List does not Load.png

Step 5 

While offline, the newly created record is accessible only through the Offline Records List (Briefcase). 

Doing that, users lose all the navigability benefits that a Lightning Web Component brings. In addition, it is challenging to search for records only using their auto-number naming.

05 - While Offline, the Record is Accessible Only Through the Offline Records List (Briefcase).png

 

-- 

 

@Irfan Syed @Adam Liechty @Yaswant Sappaa

 

 

 

4 respuestas
  1. 12 jun 2025, 20:48

    Thanks for the reply @Yuri Garcia Caetano. I think that answers my first question. However, I'm curious about my #2 and #3 questions: What does the GraphQL query wire emit in cases of a record that was not previously accessed? Your function wired to your graphQL query should be called with an object: {data, errors}. I'm assuming in the case the related list fails to show, 'data' is not defined when your function is called back, but 'errors' has some info about what went wrong, which will hopefully point us in the right direction.

0/9000

Hi everyone,

We’re currently working with Salesforce Mobile Plus and using the Briefcase feature to sync data offline. We have around 5,000 records across all configured objects. However, syncing the briefcase takes a very long time on the device.

A few questions I’m hoping to get help with:

  1. Is there any configuration available to optimize sync performance (e.g., increasing chunk size or batching options)?
    • We’ve noticed that records seem to sync in chunks of 50 — can this be adjusted?
  2. Is it possible to trigger sync from outside the Briefcase Sync page?
    • We’d like to improve the user experience by allowing sync from other points in the app.

Any guidance, best practices, or documentation links would be greatly appreciated!

Thanks in advance!

0/9000

Hi

We are trying to set up Mobile App plus.

We are not able to see the offline App.

Can you please guide us?

@Irfan Syed

Thanks

Chameen

6 respuestas
0/9000

i just added this feature  to my scratch org and faced with the error "

Error: Form data not supported in aura network transport

"

I've implemented the offline upload functionality to my scratch org and faced with the err

"

6 respuestas
0/9000

 

Hi, there! 

 

Just got my scratch org set up for Offline Mode development, but running into an issue where the quick action for the offline view is namespaced, so the Offline App is not able to find the experience. Has anyone else encountered this issued? 

Offline Mode in Scratch Org can't recognized namespaced

 

 

File (2).jpg

 

 

2 respuestas
  1. 3 mar 2025, 15:23

    @Jean-Sébastien Plante

    Firstly, thank you for your reply. It's nice to know I'm not just riding the "crazy train" alone. 

     

    My company submitted a Sev 1 bug with Salesforce and they basically told us there is no solution in the short term. We use a similar setup to the one you laid out - we deploy the offline experiences directly into a non-namespaced org, and then install our 2GP package version to test. It's been a real pain, as it essentially puts a barrier of development and testing between front-end and back-end. 

     

    I really hope they fix the issue soon, but I'm not holding my breath.

0/9000