I am trying to open a Lightning component with a record id in new page / full screen from a Quick Action. Since, the component opens in a small popup, I used the approach mentioned here
How to open lightning component tab from lightning quick action instead of lightning modal?
to use a navigator component in between that will redirect to original component.
This works great in internal Salesforce Org. However, it is not working in community.
As per Salesforce Support, the lightning component Force:navigateToComponent is depreciated and doesn't work in Community.
I have been asked to use lightning:isUrlAddressable , however it does not support state whereas I require the record Id.
Based on the release note:
Salesforce suggests to use comm__namedPage however there isn't enough documentation.
How can I open a Lightning Component in full screen within Salesforce and in Community with Record Id from Quick Action?
So answering my own question.
Below is the response I received from Tier 3:
lightning:navigation is supported in Communities however the page reference type for standard__component is not supported. So currently you can't navigate to a lightning component in Communities using lightning:navigation .
Unfortunately force:navigateToComponent isn't supported in Communities either .
support for the standard__component page reference will be added to Communities in the next release(safe harbor).
The only navigation component that is currently supported in Communities is force:navigateToURL. One possible solution you could try: 1. Create a new page (timesheetline) in the community and place the target component here 2. Create a lightning component with a custom button that navigates to the above page via force:navigateToURL 3. Place the button somewhere in the object detail page for the community.
And the controller:
The component to which we will be navigated will have controller as: