Here’s one of the most common questions asked by people who are learning Salesforce: “What is the difference between Page Layouts and Lightning Record Pages?” And I get it – a lot of these things sound so similar and do such similar things that it’s hard to know what is what. What’s even worse is that it can depend on whether your org is on Lightning or not, or even how your objects have been set up.
In this article, I’ll provide a detailed explanation of each – what they are, as well as when and how to use them most effectively.
Page Layouts
Page Layouts in Salesforce are a method of controlling the way fields look on a record, and the way users interact with these fields in Salesforce. It also decides which related lists to display, what columns are in those lists, and in what order. It is essentially one large box that holds any/all fields for that record. The admin can set certain fields to be required or read only, and add blank spaces and sections to help organize all the fields.
In the first image, you can see that I’m in the “Page Layouts” section for this object (account). This page layout has two sections. Some of the fields are marked as required with a red asterisk, and some of them are marked as read only, with a lock symbol. The address fields are in a separate section.
In the second image, you can see some of the related lists for this object.
Back in the times of Classic, or even in early Lightning days, this was your only method of controlling the way fields or related lists (or buttons, too!) looked on a Page Layout when viewing a record in Salesforce. Page Layouts are very basic, with an easy drag and drop interface, but have a lot of limitations.
Lightning Record Pages
Lightning Record Pages are the upgraded version of the Page Layouts from Salesforce Classic. Yes, Lightning Record Pages display fields for an object, just like a Page Layout, but they also do so much more. The trick is knowing if you’re using a Page Layout on a Lightning Record Page, or just a Lightning Record Page on its own. Remember, you could possibly have a Page Layout section on a Lightning Record Page, but Lightning Record Pages themselves are only available in Lightning.
If you remember, a Page Layout is a box that contains fields, related lists, and buttons. You can take a Page Layout and stick it on a Lightning Record Page, but not vice versa.
Lightning Record Pages give you a huge amount of control over what shows up on a record, how the user interacts with that record, and who sees what based on profile, app, record type, or even if they’re using mobile or desktop to view the page.
You may notice that all page layouts generally look the same. There’s a field section on top, which you have the option for one or two columns, and a section for related lists below. There are no other options. Lightning Record Pages give you complete control over the structure of the entire page itself, allowing for up to three columns, sidebars, headers, pinned or not pinned, and more.
Within the structure of your given page, you can control everything. You can add sub-tabs for fields or related lists (mix them up as needed). You can add Rich Text components to display messages to your users.
This is an example of a Lightning Record Page with three columns. There is a lot going on here, but most importantly, you can see that fields are mixed up in different columns, and so are the related lists. I also have a special related list for opportunities – it’s not just all opportunities, it’s “Open Opportunities”. You’ll also notice that I have sub-tabs for contacts and cases. With a Lightning Record Page, you add “components” (each of these little boxes is a “component”) to your page, and organize them. The boxes that you see that contain fields are called “field sections” and can have just the specific fields that you choose. Another thing you may notice is the small orange “eye” indicator on the NAICS component. That means that the NAICS component has a visibility rule applied to it – only certain people can see that one box. We also have a rich text component – that’s the red banner for Tier 1 Accounts.
This feature that I’m describing is called “Dynamic Forms”. Migrating to Dynamic Forms is a great way to improve record usability and page load times, among other benefits.
So when you compare this view to the Page Layout, you’ll see there is a lot more customization possible with Lightning Record Pages. Lightning Record Pages are also getting constant updates, with more powerful and interesting updates with every release.
Overlap
You may recall that earlier I mentioned that it is possible to stick a page layout onto a Record Page. This is where the overlap (and confusion) comes from.
This is an example of a Lightning Record Page with one column and one sidebar. In our main column, we have one single giant component called “Record Detail”:
These fields are all lumped together in this one giant box. I cannot make any modifications here to where the fields are, if they are required or read only, and I cannot break them out into logical sections. If I wanted to make any modifications to any of those things, I’d have to go back to the page layout and make those changes there.
It can get really confusing especially when you’re not the person that created these pages, and you’re looking at an org that someone else set up! If you’re ever unsure, go to the Lightning Record Page, and click the box with the fields.
If you click on the component and you see “Record Detail” in the top right corner, it means you either need to make your modifications on the Page Layout, or upgrade your page to use field sections with Dynamic Forms.
Here’s a fun tip: if you select the “Two Equal Regions” structure for your Lighting Page, you can add your field sections, and actually have four columns of fields, instead of two like on a Page Layout. Dynamic Forms like this are available on most objects in Salesforce, but not all (like campaigns).
Page Layouts vs. Lightning Record Pages
Page Layout | Lightning Record Page | |
---|---|---|
Easily arrange fields in to sections, make editable or read only | ✅ | ✅ |
Determine visibility by Record Type or User Profile | ✅ | ✅ |
Control which buttons and actions appear | ✅ | ✅ |
Determine visibility of buttons and actions based on criteria | ❌ | ✅ |
Determine visibility by app | ❌ | ✅ |
Rearrange field sections and related lists to intermix | ❌ | ✅ |
Add sub tabs | ❌ | ✅ |
Add Dynamic Form | ❌ | ✅ |
Add Path | ❌ | ✅ |
Add Rich Text Component | ❌ | ✅ |
Add VisualForce | ✅ | ✅ |
Add Lighting Web Components | ❌ | ✅ |
Add Dynamic Related Lists | ❌ | ✅ |
Control the number of columns and page arrangement | ❌ | ✅ |
Add Screen Flows | ❌ | ✅ |
Summary
Page Layouts and Lightning Record Pages can certainly be confusing, but I hope this article is able to explain the difference and help you to make more effective updates to your Salesforce org. And with everything related to Salesforce Classic, Page Layouts are probably going to go away eventually anyway. Your org will probably have to fully migrate to Lightning Record Pages at some point in the future, so it’s worth getting a head start on it now!
Comments: