I have a Lightning Component which implements 'isURLAddressable' interface. I am calling this component from my Apex Class.



Within Salesforce, this URL works fine and I get navigated to my TestComp component. But in Communities,it is not working.

I tried modifying the URL to below:

'/<CommunityURL>/lightning/cmp/c__TestComp?c__param1=test' ---- Not Working in Communities


'/<CommunityURL>/cmp/c__TestComp?c__param1=test' ---- Not Working in Communities


Any idea on how can I call Lightning Component from Apex class which could work in Communities?

1 Answer 1


I think this interface is not available in community.

This navigation feature is supported only in Lightning Experience and the Salesforce App.


  • But even If I remove 'isURLAddressable' interface from the component, still it doesn't gets called. Looks like there is some other way to call the Component in the URL for communitites.
    – sfdc07
    Commented Apr 22, 2020 at 7:28
  • You can not call a component which is on different page. Simple solution would be create a new page in community, drag your lightning component there and provide url of that page in your code
    – Ayub
    Commented Apr 22, 2020 at 7:52
  • Can you help me with a small code snippet?
    – sfdc07
    Commented Apr 22, 2020 at 7:54
  • You need to redirect to a url, which is a lightning component, from apex, right?
    – Ayub
    Commented Apr 22, 2020 at 7:55
  • Yes right.. In Salesforce the URL '/lightning/cmp/c__TestComp?c__param1=test'; works fine but in Communities it is not working even if I prefix CommunityURL '/<CommunityURL>/lightning/cmp/c__TestComp?c__param1=test'
    – sfdc07
    Commented Apr 22, 2020 at 7:57

You must log in to answer this question.

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