You need to sign in to do that
Don't have an account?

how to use navigateToURL in lightning
Hi,
I want navigate from lightning to apex visualforce page. And I used window.top.location and the page will be shown without sidebar.
How to use navigateToURL? I tried to use like below js but it doesn't work.
navigateTest: function(component, e, helper){
$A.get("e.force:navigateToURL").setParams({"url": "/apex/test"}).fire();
}
Does someone know this? Thanks a lot.
I want navigate from lightning to apex visualforce page. And I used window.top.location and the page will be shown without sidebar.
How to use navigateToURL? I tried to use like below js but it doesn't work.
navigateTest: function(component, e, helper){
$A.get("e.force:navigateToURL").setParams({"url": "/apex/test"}).fire();
}
Does someone know this? Thanks a lot.
Use like this:
I tried you method but it doesn't work. Nothing happend. Any suggestion?
Thank you very much!
Ying
Even i tried the above fix but get the following error :-
Something has gone wrong. Action failed: c$BookAppt$controller$bookAppt [TypeError: Cannot read property 'setParams' of undefined] Failing descriptor: {c$BookAppt$controller$bookAppt}. Please try again.
I have created a button component and from that component's controller calling the helper and within the helper calling the
$A.get("e.force:navigateToURL")
Let me know if any other fix is needed for this navitageToURL to work.
I am also facing the same issue and tried hard but still not able to find the fix , please share if you have resolved the same
Copyright © 2000-2016 salesforce.com, inc. All rights reserved. | Privacy Statement | Security Statement | Terms of Use | 508 Compliance | Go to Salesforce1
This page has an error. You might just need to refresh it. Action failed: c$PlaningListcomp$controller$gotoURL [Cannot read property 'setParams' of undefined] Failing descriptor: {c$PlaningListcomp$controller$gotoURL}
I will be grateful to you
Please include below dependcy in your components:
<aura:dependency resource="markup://force:navigateToURL" type="EVENT" />
I guess, it will fix the issue.
Thanks,
Ravindra.