How to Customize Record Details with Page Layouts

Introduction

Salesforce provides us with two ways to customize and tailor pages based on our needs :

Table Description automatically generated

So, why two? Shouldn’t we be able to get it all done in a single space?

Salesforce says it’s because the Lightning App Builder cannot customize buttons, actions, and fields on pages…yet.

What are Page Layouts?

Page Layouts manage the layout of object record pages. It controls the layout and structure of buttons, fields, custom links and the lists of related records users see. They also help determine which fields are visible, read-only and required. It doesn’t end there, they also determine the quick actions that appear on the page and more.

I know that was a lot to take in. Let’s take a tour through an Account record for a better understanding.

Graphical user interface, application, email Description automatically generated

The following segments of a page can be configured using Page Layouts.

  1. Related Tab – Contains lists of any other records that are related to the record you’re viewing.
  2. Details Tab – Contain information on that record.

NOTE : Edit – Is used to change the contents of the fields in the Details tab. (However, you cannot configure which fields appear in the Details tab.)

Let’s Get To Know Page Layouts

Before we get hands-on and configure a page using this functionality, why don’t we get accustomed to the Page Layout Editor?

Follow these steps to access account Page Layout in your org.

  1. From Setup, click Object Manager.
  2. Open the Object, Account.
  3. Select Page Layouts , from the sidebar.
  4. Open Account Layout.

Woah! I know there’s a lot going on here, let’s take it apart to make sense of what’s happening here.

 

Graphical user interface, application Description automatically generated

Imagine you’re an artist painting a masterpiece. A is your paint palette with multiple colours to choose from and B is your painting.

The Page Layout Editor is separated into two halves: A and B.

“A” contains all the basic elements such as fields, buttons, actions and links that you can add to and arrange in “B”.

NOTE: The Highlights Panel is visible here but of no use to us. We use the Compact Layout to customize the highlight panel in Lightning Experience. The Highlight Panel in Page Layouts controls the highlight panel in Salesforce Classic UI.

How to Customize Fields in Record Details?

Why don’t we get hands-on and gain some experience by customizing the Fields in the Details tab of the Account Object record?

If you aren’t already on the account page layout, follow the steps in the section above to get started.

1. Let’s remove the Fax field from the details tab in accounts record pages – Simply drag the Fax field off the page layout and drop it back onto the palette.

2. Let’s make the Website field compulsory – Hover over the Website Field and click the wrench icon. Select Required and then click Ok. The Required field should have a red star next to it now.

Graphical user interface, text, application, email Description automatically generated

What do these icons next to some of these field labels mean?

Table Description automatically generated

How to Create a Page Layout?

To create a new Page Layout we can take two routes, either start from scratch or clone a default layout and make necessary changes to the clone. We’ll be taking the latter approach here.

1. From Setup, select Object Manager.

2. Open the Account Object.

3. Select Page Layouts from the sidebar.

4. Click New.

5. In Create New Page Layout enter the following :

  • Existing Page Layout: Account Layout
  • Page Layout Name: New Account Layout

6. Click Save.

7. Let’s remove the following fields from the details tab by dragging it back onto the palette:

  • Rating
  • SLA Expiration Date
  • SLA
  • SLA Serial Number
  • Upsell Opportunity
  • Billing

8. Let’s add these fields to the details tab by dragging and dropping them from the palette onto the page layout :

  • Account
  • Year Started

9. Under Related Lists :

  • Drag Invoices from the palette and drop it above Contacts.
  • Remove Open Activities

10. Click Quick Save, then Yes.

We created a page layout, but no one can see it just yet. To make it visible, let’s assign it to a profile.

How to Assign a Page Layout to Profiles?

1. From Setup, select Object Manager.

2. Open the Account Object.

3. Select Page Layouts from the sidebar.

4. Click Page Layout Assignment on the top-right corner.

5, Click Edit Assignment.

6. Select the System Administrator Profile, and for Page Layout To Use, choose New Account Layout. (We’re choosing System Administrator so that can see the changes we made, this wouldn’t be the case normally.)

7. Click Save.

Navigate to any account record to see the changes for yourself.

Image Source

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.