Dynamic Forms versus Record Detail
Key Takeaway
To show or hide individual fields based on another field's value, the page must use Dynamic Forms visibility rules. A Record Detail component can't do it, because it shows the page layout's fields as one fixed block.
A Lightning record page shows record fields in one of two ways. The Record Detail component shows the fields from the object's page layout as one fixed block. Dynamic Forms turns each field and field section into its own component that you place and control in Lightning App Builder. Knowing which one a page uses tells you which tool edits the fields and what you can do with them.
Record Detail versus Dynamic Forms
In Salesforce Classic, you customize record pages with the page layout editor, because Lightning App Builder customizes only Lightning record pages. In Lightning Experience, the deciding question is how the page delivers its fields: through a Record Detail component or through Dynamic Forms.
| Record Detail component | Dynamic Forms | |
|---|---|---|
| Where the fields come from | The object's page layout, in one big block | Field and Field Section components on the Lightning App Builder canvas |
| Where you add, remove, or move fields | The page layout editor | Lightning App Builder |
| What you assign | Both a Lightning page and a page layout (dual model) | The Lightning page (single assignment model) |
A page that uses a Record Detail component still opens in Lightning App Builder. Even so, you must use the page layout editor to add, remove, or move the fields inside the component.