function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pandeiswari SathiakumarPandeiswari Sathiakumar 

How to pass URL parameter in Lightning Record page for LWC component embed in the page

Hi,

I have a visualforce page. When clicking on button, it should open the Contact Lightning Record Page with additional parameters in the URL. I have one LWC component embedded inside the Contact Record Page. That LWC component should use this additional parameter from the URL to display data.

Please let me know how to accomplish this.

 
Abhishek BansalAbhishek Bansal
Hey,

You can get the help from the link below:
https://salesforce.stackexchange.com/questions/266680/lwc-get-url-parameters-in-community

Thanks,
​​​​​​​Abhishek Bansal.
Kostiantyn HladkyiKostiantyn Hladkyi
The trick is that your parameter name should contain a namespace or at least start from "c__". Otherwise it will be ignored.
Example: /lightning/r/Contact/0030N00003Pb8J5QAJ/view?c__abc=123
https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_forcecom_general_namespace_prefix_cruc_reminder.htm