I needed a custom popup for creating and editing a record. To achieve this I have created a LWC which will create and edit the record.

I had wrapped this component with an aura component. and overridden the New and Edit buttons with this component.

Now the create works fine but for edit I needed the recordId from the object context.I have followed the below documentation but its not working as expected.


But when the user clicks edit from the list view as well as the edit button in record detail page the custom component opens but the record id is not populated automatically as it was explained in the documentation.

Can someone help me find my way around this?


  • Please could you provide more detail, including snippets of code? There are aspects you have not explained, such as what type of actions you overrode. I am guessing that you are overriding page-level actions, but you could have overridden a global action (for new at least) or list action(s), and each of these will behave differently. The link you cite applies to top-level components inserted in a Lightning Record Page.
    – Phil W
    Sep 27, 2019 at 7:13
  • For the action, did you try doing something like this? I recommend you edit your question if you want someone to be able to answer it.
    – Phil W
    Sep 27, 2019 at 7:14
  • @PhilW I did mentioned i was trying to override new and edit. I have now highlighted them for better readability Sep 27, 2019 at 7:20
  • 1
    Hi, yes but actions can appear in all sorts of different contexts where access to record ID can vary. Anyway, I see it was just an issue with not passing the value from your top-level component (Aura) into the child (LWC).
    – Phil W
    Sep 27, 2019 at 7:23

1 Answer 1


I have solved this issue by passing the recordId from aura component.

    <c:adminSaveProgramTemplate recordId="{!v.recordId}"></c:adminSaveProgramTemplate>

You must log in to answer this question.