function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jaelee125jaelee125 

Overriding standard actions with lightning components in community

It looks like Salesforce currently doesn't support getting parent Id when standared actions are overridden using a lightning component. However, there seems to be a workaround using url hacks. https://www.salesforcebolt.com/2020/04/get-parent-id-salesforce1-Lightning-Component.html. 

However, this hack does not work for communities. Is there any way to get a related parentId when overriding standard actions (such as new) with a lightning component in Communities?
Best Answer chosen by jaelee125
VinayVinay (Salesforce Developers) 
Hi,

Unfortunately, URL hack doesn’t work with Lightning Out, Lightning communities, or the Salesforce mobile app.

Review below link for more details.
https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_general_lex_navigate_to_record_dfv.htm

Check below links for workarounds.
https://marktyrrell.com/posts/alternatives-to-custom-button-url-hacks-for-lightning-experience/

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar