In my ORG I have an user shared to many people. There is an object that contains some custom fields. I would like to configure a page layout that would display a subset of these custom fields based on a value of one specific custom field.

For example:

  • There are 20 custom fields
  • If the CustomField "TypeOfAccount" = "A", the page layout shows 15 custom fields
  • If the CustomField "TypeOfAccount" = "B", the page layout shows 10 custom fields

How to achieve this?

  • Is this on accounts or a standard object? Are you utilizing record types? Sep 27, 2021 at 14:33
  • 1
    if this is a custom object, and if you are using Lightning UI, you can use Dynamic Forms which allows you to create two different sections (it also allow duplicate fields across sections), then you can set the visibility for each section based on your criteria. Sep 27, 2021 at 14:42
  • Hey @hengky-ilawan Dynamic Forms was exactly what I was needing! Sep 27, 2021 at 15:45

1 Answer 1


You can achieving this behavior via Lightning record page with Component Visibility feature.

Please refer this trailhead link which will help you to understand how to do that.

Please let me know if it helps.

  • It is nice. But on the details record, it brings all fields. The filters are applied to all component. How to apply a filter to a section of a Page Layout? Sep 27, 2021 at 15:06
  • 1
    Make 2 record details page, and add the set of fields into that 2 record details page sections(as you mentioned 15 and 10). apply the component visibility feature to the record details page section based on your TypeOfAccount field. Let me know if it helps.
    – Raj
    Sep 27, 2021 at 15:41

You must log in to answer this question.

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