1

I was trying to use force:navigateToComponent and Lightning:Navigation for navigating to a new component. Both seems to not work in communities. Is there any work around?

1 Answer 1

1

In communities, navigateToComponent or Lightning:navigation will not work, they are not supported there:

This event is handled by the one.app container. It’s supported in Lightning Experience and the Salesforce app.

You will have to use force:navigateToURL if the components are in other community pages, otherwise, you will have to change your logic in your component to display the appropriate component based on your criteria "manually" (not with navigation events)

2
  • How to use force:navigateToURL to navigate to a lightning component in communities? Can you please provide me with something usefull to work upon. I am not able to build the URL.
    – Arteezy
    Mar 20, 2019 at 14:09
  • Arteezy, I would suggest you open a new post with your questions and include what you have tried and what is not working. 1 quesiton, 1 Answer. Additionally, if this helped clarify why what you were attempting was not working, accept the answer so it is marked as resolved.
    – glls
    Mar 20, 2019 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.