You need to sign in to do that
Don't have an account?
Gurleen Kaur
Redirecting to a Lightning Component from Apex Class not working in Communities
I have a Lightning Component which implements 'isURLAddressable' interface. I am calling this component from my Apex Class.
ApexClass
...
'/lightning/cmp/c__TestComp?c__param1=test';
...
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
OR
'/<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?
ApexClass
...
'/lightning/cmp/c__TestComp?c__param1=test';
...
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
OR
'/<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?
As per below documentation 'isURLAddressable' is not supported for communities.
https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation
Check if you can use 'lightning:navigation'.
https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation
Thanks,
Vinay Kumar