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

Комментарии • 11

  • @ReinierLopez-q3x
    @ReinierLopez-q3x Месяц назад +1

    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

    • @vikasprasad5309
      @vikasprasad5309 Месяц назад

      This url addressable is not applicable for experience site..u can use in dev

    • @SalesforceBolt
      @SalesforceBolt  Месяц назад

      It’s not supported in experience site.

  • @nagaraj8730
    @nagaraj8730 4 месяца назад +2

    plz add this video into LWC play list

    • @SalesforceBolt
      @SalesforceBolt  4 месяца назад +1

      Added, thanks for the reminder 🙂

  • @tilakpadole5925
    @tilakpadole5925 4 месяца назад +2

    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?

    • @wamconsultant
      @wamconsultant 4 месяца назад +2

      Check the API version of your LWC. Make sure it is API Version 60.

    • @SalesforceBolt
      @SalesforceBolt  4 месяца назад +1

      Is it solved?

    • @tapiosaarnio1742
      @tapiosaarnio1742 4 месяца назад

      @@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."

    • @tapiosaarnio1742
      @tapiosaarnio1742 4 месяца назад

      Let me know if you solve this!

    • @YorkZhang-vs4nu
      @YorkZhang-vs4nu 4 месяца назад

      @@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.