+ Start a Discussion
Ashsih jaiswalAshsih jaiswal 

how to naviagte to vf page on button click at lighting

HI All,

I have one custom VF page. I want to open th vf page on button click at lighting community. How can I achieve the functionality.
I am new in lightning 

You can navigate to the vf page using the navigateToUrl event in lightning
Use the button in lightning component to call a JS Controller function  like this 

 <lightning:button variant="brand" label="Navigate" onclick="{! c.navigateToPage}" />  
navigateToPage: function(component, event, helper) {
    var urlEvent = $A.get("e.force:navigateToURL");
        "url":"vfpage url" //Enter your page url here
    urlEvent.fire(); }
Do let me know if you have any further queries.

P.S: Kindly mark this as the best answer if this helped you.

Thanks and Regards
Shubham Kumar
Could you please tell me the name of your page and the name of the parameter that you are trying to pass in the url.