I have a visualforce page that using Lightning Out App to show aura component to Non Authentication user. And when I click the button to save record on Aura Component and the result return successfully then the visualforce page need to close on the browser tab.

I have check on this document about communication about Lightning component and Visualforce page. https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-visualforce-communication.html

But this one show an example using visualforce page in lightning component using iframe so I want to know is there any other suggestion for communicate between LC and visualforce page when using Lightning out app.

1 Answer 1


Please do not try to follow the instructions from the blog post you quoted - it is fatally flawed because it requires VF and Lightning URL values in the opposite contexts (I.e. VF URL in Lightning context and Lightning URL in VF context) and there is no API that would allow you to do this dynamically. This then requires the use of hard-coded URLs, which means trouble when you want to create a sandbox etc. All the URLs would only work in one org - the original.

Regardless, the correct way to deal with such communication is to use the Lightning Message Service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .