Enable Lightning Web Security for StoreConnect
On this page
Use this process to turn on Lightning Web Security (LWS) in your Salesforce org before you install StoreConnect. StoreConnect uses dynamic imports in its Lightning Web Components, and Salesforce only allows dynamic imports when LWS is enabled. Installation fails without it.
LWS is an org-wide setting that is on by default in Salesforce orgs created after 2023. If your org predates that, check the setting before installing StoreConnect.
Before you begin
- You need to be logged in to Salesforce as a System Administrator.
- LWS applies to every Lightning component in the org, not just StoreConnect. If you have other custom or managed components, check them for compatibility first. Salesforce provides a compatibility tool in Setup.
Enable Lightning Web Security
- Go to Setup > Session Settings.
- Scroll to the Lightning Web Security section.
- Select Use Lightning Web Security for Lightning web components and Aura components.
- Select Save.
- Clear your browser cache. The setting can take a couple of minutes to take effect across the org.
- Return to Setup > Session Settings and confirm Use Lightning Web Security for Lightning web components and Aura components is now selected. LWS is active once the checkbox stays selected after the page reloads.
Install StoreConnect
Once LWS is active, retry the StoreConnect installation on AppExchange. The installation completes without the LWC1503 error.
:::note LWS is backward compatible with most components. If you find that your other apps or components are affected, you can switch LWS off, resolve the issue in those apps, and switch it on again. StoreConnect cannot be installed while LWS is off. :::
LWC1503 error
If the installation fails with LWC1503: Dynamic imports are not allowed, LWS is not enabled. Enable it using the steps above, clear your browser cache, then retry the installation from AppExchange. No data or setup information in your org is affected by a failed installation attempt.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.