How can you pass parameters to a Salesforce Lightning Web Component using a URL?


I think you may have to wrap your LWC in a traditional Aura component and then use isUrlAddressable interface https://developer.salesforce.com/docs/component-library/documentation/lwc/reference_page_reference_type

| improve this answer | |
  • Thanks... Been searching for that.... Can you add the URL in a Custom Button like /lightning/app/{!Case.ID}/o/Case/home as well? – CodeMonger Oct 15 '19 at 14:32
  • Yes you should be able to – Bryan Anderson Oct 15 '19 at 14:35
  • How? Do you happen to have an example? From what i read it seems as though you cannot... – CodeMonger Oct 15 '19 at 14:39
  • 1
    Is this what you are referring to help.salesforce.com/… – Bryan Anderson Oct 15 '19 at 14:40
  • Yes, I know of URLFOR which is what i would like to use but is it possible that Salesforce is going to take away URLFor like returl? – CodeMonger Oct 15 '19 at 14:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.