I have a LWC Navigation component that is going to a custom tab that inturn loads a VF page, with params. This all works as expected and the url structure for the user is correct. However in the VF controller i was unable to get out my parameters. When i check the URL passed it looks to have become encrypted somewhere.



Apex controller using ApexPages.currentPage().getUrl()


Any thoughts on why this happens and how to get the parameters i need out?


Page is loaded in iframe in lightning so apex is giving you iframe url.

For achieving this, you need lightning component in tab inside which you can have iframe with src your vf page. Lightning component can read url parameters through pageReference when you implement lightning:isUrlAddressable. Then, component has to send the parameters to page. For this you need to establish communication between component and page using window messaging service. For that, you have to implement event listener in page and dispatch message event from component. For understanding how to implement this, refer How to print iframe in Lightning Component

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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