You need to sign in to do that
Don't have an account?
Pedro Paiva
Is there a best practice to redirect to URL in a lightning component ?
I built a lightning component from where i call to a external URL using window.location.href = 'someurl'. But i don't know if that is a good practice in Salesforce Lightning Experience. I also tried with sforce but i would need to add it through connection.js and apex.js and from the lightning component itself i can't. (Sorry for my bad english, i am not a native english speaker)
Thanks in advance :)
Thanks in advance :)
In Lightning force:navigateToURL opens new tab for external URLs if you want to open in new tab you can use navigateToURL
in case you want to open in the same tab you need to use standard javascript as I hope this will help you
Regards
Ashif
All Answers
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_force_navigateToURL.htm
In Lightning force:navigateToURL opens new tab for external URLs if you want to open in new tab you can use navigateToURL
in case you want to open in the same tab you need to use standard javascript as I hope this will help you
Regards
Ashif