0

To save quite a lot of work, it would be great if this is supported:

<lightning-record-edit-form record-id={record1Id} object-api-name="Type1__c">
    ...
    <lightning-record-edit-form record-id={record2Id} object-api-name="Type2__c">
        ...
    </lightning-record-edit-form>
    ...
</lightning-record-edit-form>

but on my first attempt the fields of the inner lightning-record-edit-form were all blank.

Anyone seen this work?

2 Answers 2

3

It's covered in the lightning-record-edit-form documentation for Usage Considerations

Nesting lighting-record-edit-form in another instance of the component, or nesting it in lightning-record-form or lightning-record-view-form is not supported.

1
  • Thanks Kris. As ever should have RTFM'd more carefully.
    – Keith C
    Aug 5, 2022 at 18:10
0

For my case, it was easy enough to move the nested form into its own simple LWC, so that looks like one approach to take for this situation.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .