Navigate with Parameters to a URL Addressable Lightning Web Component in Salesforce ☁️⚡️
HTML-код
- Опубликовано: 16 сен 2024
- In the Summer '24 release Salesforce gives us ability to make our Lightning Web Components URL Addressable and navigate to it without using Aura Components.
Before this the only way to navigate to a LWC was by embedding it inside an Aura Component. I had written a blog on it if you wish to learn more about the previous methods please use below link.
www.salesforce...
To generate a URL for your Lightning web component and make it available via a URL, include the lightning__UrlAddressable target in your component’s .js-meta.xml configuration file. Set the isExposed tag to true. The apiVersion tag has no impact on this feature and can be set to an earlier or later version.
To navigate to the custom component, use the lightning/navigation module with the standard__component page reference type.
#refresh #lwc #salesforce
Join me on Instagram : / iamkapilbatra
My journey : www.salesforce...
Blog / Code Snippet : www.salesforce...
Website : www.salesforce...
LinkedIn : / salesforcebolt
Twitter : / salesforcebolt
Facebook : / iamsalesforcebolt
Hi,
I tried this approach in an Experience site and couldn't get it to work, the navigation button won't display the destination LWC. Anyone tried this in a site? thx
This url addressable is not applicable for experience site..u can use in dev
It’s not supported in experience site.
plz add this video into LWC play list
Added, thanks for the reminder 🙂
Hi,
Upon attempting to implement this, I encountered the error message 'lightning__UrlAddressable is not a valid TARGETS'. Even after creating a new org instance, the error persisted.
Can you Please help?
Check the API version of your LWC. Make sure it is API Version 60.
Is it solved?
@@SalesforceBolt Not solved, I am having the same problem. Changing the api version to 60 did nothing. Also in the documentation it says: "The tag has no impact on this feature and can be set to an earlier or later version."
Let me know if you solve this!
@@tapiosaarnio1742 I also encounter this issue, seems this feature is not released because this is a preview version for now, may be partner environment can test this, dev edition or sandbox will be available after summer 24 release, you can check the release timeline and test this feature.