Skip to content
Tutorials Center
My learning

Topics

Lesson 14 of 36 ยท Objects, Fields and Data Model

Page Layouts, Record Types and Lightning Record Pages

Control what users see: page layouts, compact layouts, record types with business processes, and Lightning record pages built in App Builder with dynamic forms and visibility.

Once an object has fields, you decide how they appear: which fields, in what order, for which people and in which situations. Salesforce gives you several layers for this. They control presentation, not security: hiding a field on a layout does not stop someone reading it through a report or the API. Security is the next chapter.

Page layouts

A page layout decides which fields, sections, buttons and related lists appear on a record page for a group of users. Edit it under Object Manager > object > Page Layouts. The editor has a palette at the top (Fields, Buttons, Custom Links, Actions, Expanded Lookups, Related Lists) and a canvas below.

What you can do:

  • Drag fields into sections and arrange them in one or two columns.
  • Mark a field Read-Only or Required on the layout.
  • Add or remove related lists and choose their columns and buttons.
  • Edit the Salesforce Mobile and Lightning Experience Actions that appear in the action bar.
  • Create sections that are collapsible.

A field can exist but be absent from a layout, in which case users do not see it on the record page (search layouts and list views have their own settings).

Assigning layouts

Click Page Layout Assignment to say which layout each profile (and record type) uses. With only one layout, everyone shares it. Salesforce encourages starting with one layout and splitting only when a clear difference exists.

Compact layouts

A compact layout chooses up to 10 fields for the compact views of a record: the highlights panel (where only the first few fit), mobile cards, hover previews and Kanban cards. Choose the identifiers a user needs to recognize the record quickly: name, owner, status, amount.

Record types

A record type lets one object behave as several sub-types. Examples: Opportunity record types "New Business" and "Renewal"; Case record types "Billing" and "Technical". A record type can control:

  • which picklist values are available (a Renewal never uses "Prospecting"),
  • which page layout a user sees,
  • which business process applies: sales process for Opportunity, support process for Case, lead process for Lead, solution process.

Create one under Object Manager > Record Types > New, choose a business process if the object has one, and pick the profiles that can use it. Each record has one record type. Users with more than one record type are asked to choose one when creating a record, unless you set a default.

Do not create a record type when a single picklist would do. Every record type multiplies the layouts, picklist selections, reports and tests you maintain. Add one when picklist values, layouts or processes truly differ.

Python Stand-in: record types change picklist values and layout

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Lightning record pages and App Builder

Lightning Experience record pages are built with the Lightning App Builder (open it from a record's gear menu > Edit Page, or Setup > Lightning App Builder). A Lightning page is made of components placed in regions of a template (for example, a header, a main column and a sidebar).

Standard components include Highlights Panel, Path, Record Detail, Related Lists, Related List - Single, Tabs, Accordion, Activities, Chatter, Report Chart, Rich Text, Flow and Related Record. The Record Detail component uses the page layout for its field list; with Dynamic Forms enabled, you place individual fields and field sections directly on the Lightning page instead, which unlocks per-field visibility rules.

Component visibility

Each component can have filters that decide when it appears. Conditions can use record fields, the user's profile or permissions, or the device form factor. For example: show the "Escalation" tab only when Priority is High and show the Contract Details panel only for users with a custom permission.

Activation

A page is not used until you activate it: assign it as the org default, per app, per record type and profile, or per app and record type. Each step overrides the previous more general one. The system chooses the most specific match.

flowchart TD
    R["User opens a record"] --> A{"Activation match?"}
    A -- "app + record type + profile" --> P1["Most specific page"]
    A -- "no, org default exists" --> P2["Org default page"]
    A -- "none" --> P3["System default page"]

Activation rules go from specific to general; the first match wins.

Other presentation tools

  • Search layouts choose columns in search results and lookup dialogs.
  • List views (filters and columns) for tabs.
  • Quick actions and global actions put "Log a Call", "New Case" or a flow in the action bar.
  • Path guides users through stages with key fields and guidance text.
  • Console navigation for service agents.
  • Related list customization: columns, sort order and buttons.
Python Stand-in: component visibility filters

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Design guidance

  1. Start with one page layout and add more only when there is a real difference.
  2. Put the fields people read most at the top; hide the rest in collapsed sections.
  3. Keep the page short: scrolling is not a feature.
  4. Remember layouts do not secure data. Use field-level security (next chapter) for that.
  5. Test with a user who has the profile in question: Log in as (if enabled) shows exactly what they see.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Does removing a field from a page layout prevent users from reading it elsewhere?

    A layout hides the field on the record page only. Use field-level security to restrict access.
  2. 2. What can a record type control?

    Record types adjust picklist values, layouts and processes for different kinds of records on the same object.
  3. 3. Where do you build Lightning record pages?

    Lightning App Builder is the drag-and-drop tool for record, home and app pages.
  4. 4. A Lightning page exists but users still see the old one. What step is most likely missing?

    A page must be activated as the org default or assigned to apps, record types or profiles.

Summary

  • Page layouts arrange fields and related lists, compact layouts choose the highlight fields, and record types vary picklists, layouts and processes.
  • Lightning App Builder lets you place components with visibility filters; Dynamic Forms place individual fields.
  • A page applies only after activation, from the most specific assignment to the org default.
  • Layouts are presentation; security is configured separately.

Next: The Salesforce Security Model