5

We have created a custom Page Layout for Case Detail and assigned it to a specific profile. In this layout, we have added multiple sections and rearranged the fields as per client requirement.

If we use the Lightning Aura component "force:recordView", then I could see that the component is rendered properly as per the custom layout defined.

force:recordView recordId="xxxxxxxxxxxxxxx">

If we use the Lightning web component "lightning-record-form", then it is NOT respecting the custom layout i.e., no sections, all the fields displayed.

<lightning-record-form 
    record-id={recordId} 
    object-api-name="Case" 
    mode="readonly" columns="2" layout-type="Full"
></lightning-record-form>

Anyone else facing this issue?

1 Answer 1

9

Lightning Record Form doesn't yet support sections. It should pull the field list from the profile assignment but it just dumps the whole layout as one big blob of fields.

8
  • Sad! so we have to do custom implementation to match the layout of force:recordView. Thanks.
    – wesfaith
    Commented May 15, 2019 at 10:56
  • 2
    Probably. You can fetch layout & section info in LWC via the UI API if that helps.
    – Charles T
    Commented May 15, 2019 at 12:09
  • Sure, I'll give it a try.
    – wesfaith
    Commented May 15, 2019 at 18:12
  • 1
    And I do agree it is sad... I complained on the Partner Community already :P
    – Charles T
    Commented May 15, 2019 at 21:49
  • Can you give me the link of your post in Partner Community?? Is there any commitment from Salesforce to implement this in future or is this intentional?
    – wesfaith
    Commented May 16, 2019 at 13:24

You must log in to answer this question.

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