Can you please guide me to open a VF page as a popup on onclick event of apex:commandbutton as window.open is not supported in lightning.


2 Answers 2


I believe you can achieve this creating a lightning component that opens up on click of the command button and then redirect to your vf from oninit handler of that component. you can have that component render as a model dialogue

                            let event = $A.get("e.force:navigateToURL");
                                    "url":"your vfpage url"

You can use lightning out to open lightning component as pop up modal on init.Also host/container vf page can have javascript methods which you can pass as attribute to lightning component and that method can be invoked from lightning component action .

You must log in to answer this question.

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