18 thoughts on “Rendering Lightning:RecordEditForm based on the page layout

    1. Naval Sharma Post author

      You need to check section.totalColumns value as we are using this to set the multipleColumn property.

      Reply
  1. Naval Sharma Post author

    You will have to use smallDeviceSize, mediumDeviceSize, largeDeviceSize attributes on lightning:layoutItem.

    Reply
  2. Bharti Harimohan

    Hi,

    Can you please also assist me to display page layout required fields using recordeditForm with lightning:inputField ?

    Reply
  3. shravya

    Hi , I tried doing the same . it was very helpful . but for some reason the required custom fields are not required .How to handle this

    Reply
  4. AshTric

    Is it possible for multiple record types ?
    If yes what are the required changes we need to make ?

    Reply
  5. Simangaliso Mathenjwa

    nice work!, tell me if the field is marked as required on a page layout, will it be a required field on the component also?

    Reply
  6. Adeel Ahmad

    Great work Naval
    But i am having an issue here, Every time when i pass the page layout name it returns me null so i am unable to proceed further. Do you have any idea why it is not working or salesforce just updated the API

    Thanks!

    Reply
    1. Naval Sharma Post author

      Make sure that you are passing a correct name. If Opportunity has a page layout name “Opportunity Sales Layout” then you need to pass it like. “Opportunity-Opportunity Sales Layout”.

      Reply
  7. Jerun Jose

    Thanks Naval for sharing this awesome post. Works as specified. I’m working on some minor improvements and will share the finished code when complete. You saved a few days of head scratching to get this started.

    Reply
  8. Manju

    HI Naval,

    I could use this in opportunity cloning(with products) where I have to get all the fields in the layout and the corresponding values to pre-populate in the fields. What would be the approach to pre-populate values in the corresponding fields? Appreciate a quick response, I have a three days deadline 🙁

    Thanks
    Manju

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.