Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Understand Apex Behavior While Offline

Additional features that are built into offline-enabled apps allow the app, including Lightning web components and even Apex, to continue to function. Knowing these features, and their limitations, is critical to writing LWCs that function well, even without a connection to the Salesforce service.

The standard Salesforce web interface requires a continuous network connection to the Salesforce service. When a standard Salesforce client, such as a desktop browser, is offline, features that require a connection to the Salesforce service—which is most features—don’t work. Since Apex runs on the Salesforce service, this includes all Apex-based features of Lightning web components.

An offline-enabled mobile app, in contrast, is designed to continue to function even when no connection to the Salesforce service is available. The offline features of the app aren’t magic; data that’s not already available on the client device is inaccessible. But carefully designed features, including Lightning web components that use Apex, can continue to run with data that’s available locally, on the device, even without a network connection.