Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

26 Comments

  1. By
    February 11, 2019

    Page just displayed all fields and sections in 1 column without any styling. Am I missing anything?

    • By
      February 15, 2019

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

  2. By
    February 27, 2019

    Is it possible to make this as responsive design
    When I view this page in mobile, the two columns cramped.

  3. By
    March 1, 2019

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

  4. By
    May 28, 2019

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

  5. By
    May 30, 2019

    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

  6. By
    July 4, 2019

    Hi Naval,
    am not fetching any custom fields in the UI. Please suggest.

  7. By
    July 5, 2019

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

  8. By
    July 17, 2019

    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?

    • By
      July 21, 2019

      Yes, there is a way but in that case it will require another approach.

  9. By
    July 21, 2019

    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!

    • By
      July 21, 2019

      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”.

  10. By
    August 9, 2019

    Hi Naval,
    Good Blog.
    Do you have code for pre-populate the same fields and save it in database?

  11. By
    September 4, 2019

    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.

  12. By
    January 5, 2020

    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

  13. By
    January 29, 2020

    Hi Naval,
    Great Blog.
    What if i need to accumulate multiple layouts at once.
    Can we do so like below?
    List componentNameList = new List{‘Contact-Contact Layout’,’Contact-Contact Sales Layout’ };
    Thanks in advance

  14. By
    January 30, 2020

    Hi Naval,
    Nice work! nice work!, I used your approach and created the lightning component but the required fields that are on page layouts are not appearing on the lightning component as required.
    Any one here have same issue?

  15. By
    February 13, 2020

    Hello Naval,
    Great Work!!
    how can we get a pagelayout name dynamically instead hard coding.
    As far as i know we can not query a pagelayout using SOQL, so how we can pass pagelayout dynamically based on profile or may be user?

    • By
      March 31, 2020

      Hi Mayank,
      Either user Metadata API or Custom Label/Custom Metadata Types for the mapping.

  16. By
    July 26, 2020

    I’m getting sections which doesnt have field in it? is there anyway to stop them ?

  17. By
    July 26, 2020

    I just did it if anyone has issue with columns you may use this in ur aura “!section.totalColumns >= 1”

Leave a comment

Your email address will not be published. Required fields are marked *