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
PRUTHVI ADMINPRUTHVI ADMIN 

How to make Lookup's “New Record” action with standard button override have the same behavior as that of “New Record” action without override?

I have overridden standard 'New' Account button with a custom lightning component by implementing override interface. This works perfectly when initiating the action from Account Home page.
Similarly, if I go to a contact page and click on 'New Account' from the Account lookup, I am being redirected to the newly created Account detail page(I have defined this redirect in the component). However, my expected behavior is that the Account should get created and the user should be redirected back to the contact edit page with the newly created Account filled in the Account lookup field. This behavior can be seen if there is NO override on the Account New button.
As per my observation, as soon as I hit the 'New Account' from lookup Contact edit page, the Contact modal seems to be removed in the background and I am getting redirected to the custom component built for 'New Account' override edit page.
I have seen many posts with similar questions but none of them had a proper answer. I might be missing something as well. One post that had exact requirement as mine can be found in the below link, but unfortunately no one answered :-(. Can someone please help. Thanks.
https://salesforce.stackexchange.com/questions/220661/overriden-standard-new-action-how-to-redirect-a-lightning-component-invoked-f