Skip to main content

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개
  1. 2025년 6월 12일 오후 8: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