Compact Layouts in Salesforce

Compact Layouts in Salesforce: How to Create, Assign, and Use Them

Hi there,

Compact Layouts in Salesforce are one of those features that quietly do a lot of work in the background. You may not notice them at first, but once they’re set up properly, they make record pages, lookup hovers, and mobile views much more useful.

In this blog, we’ll understand what Compact Layouts are, where they appear, and how to create and assign them using a simple, practical example.


A Compact Layout controls which fields are shown in the highlight area at the top of a record page. It also decides what information appears when you:

  • Hover over a lookup field (for example, hovering over Account on an Opportunity)
  • View records in the Salesforce mobile app

Think of a Compact Layout as a quick summary of the most important information about a record.


Compact Layouts are used in multiple places:

1. Highlight Area on Record Page

When you open a record (like an Opportunity), the fields from the active Compact Layout appear at the top of the page in the highlight panel.

2. Lookup Hover Details

If an Opportunity has an Account selected and you hover over the Account name, Salesforce shows the fields from the active Compact Layout of the Account object.

Each object uses its own Compact Layout, even when viewed from another object.

3. Salesforce Mobile App

On mobile devices, screen space is limited. Compact Layouts are especially important here because:

  • Only Compact Layout fields are shown first
  • Users get a quick view without scrolling

This makes Compact Layouts very useful for users working on the go.


For this blog, we’ll work with the Opportunity object. It’s a great example because it’s widely used and benefits a lot from the quick visibility of key fields.

Fields We’ll Show in the Opportunity Compact Layout

We’ll use only standard fields:

  • Opportunity Name
  • Account Name
  • Stage
  • Amount
  • Close Date
  • Owner

These fields answer the most common questions at a glance:

  • Which deal is this?
  • Who is the customer?
  • What stage is it in?
  • How much is the deal worth?
  • When is it expected to close?

Follow these steps:

  1. Go to Setup
  2. Open Object Manager
  3. Select Opportunity
  4. Click on Compact Layouts
  5. Click New

Now fill in the details:

  • Label: Opportunity Quick View
  • Name: Opportunity_Quick_View (auto-filled)

  1. Move the following fields from Available to Selected:
    • Opportunity Name
    • Account Name
    • Stage
    • Amount
    • Close Date
    • Opportunity Owner
  2. Click Save

You’ve now defined what information should appear in the highlight area, lookup hover, and mobile view.


Creating a Compact Layout is not enough. You must assign it.

  1. Go back to Compact Layouts on the Opportunity object
  2. Click Compact Layout Assignment
  3. Click Edit Assignment
  4. Select Opportunity Quick View as the primary layout
  5. Click Save

Once assigned, Salesforce starts using this layout immediately.


After assignment:

  • The Opportunity record page shows these fields in the highlight area
  • Hovering over Opportunity in lookups shows these fields
  • Salesforce mobile users see these fields first

No page refresh or deployment is required.


Compact Layouts help because they:

  • Reduce scrolling
  • Show only what’s important
  • Improve mobile usability
  • Make lookup hovers more informative

They’re handy for sales teams who need fast answers, not full pages.


A quick comparison:

  • Compact Layouts: Control the highlight area, lookup hover, and mobile summary
  • Page Layouts: Control the full record detail section

Both work together, but they solve different problems.


Compact Layouts are small, easy to configure, and often ignored—but they make a big difference in daily Salesforce usage.

If you want cleaner record pages, better lookup hovers, and a smoother mobile experience, setting up Compact Layouts properly is worth it.

Stay tuned for more practical Salesforce learnings on SFDC Insights.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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