Lightning pages are custom layouts that allow you to design pages for Lightning Experience that are mobile responsive. These pages are built using templates that divide the page into regions that adjust for visibility based on the device used to view the page. Lightning pages support standard components, custom components, and third-party components downloaded from the AppExchange.
In this chapter, we will cover the following Lightning page features in detail:
With the help of these topics, you will be able to configure and deploy Lightning pages in your Salesforce org.
For this chapter, make sure you log in to your development org and follow along as we work through the different customizations to Lightning pages available to a system administrator.
Lightning pages allow you to add custom items to a page with much more flexibility than the older page layouts that are used in Salesforce Classic. Lightning pages allow you to pull in the page layouts and add much more customization and flexibility. You can create three types of Lightning pages:
For our example, we will create a customized record page for Lightning Experience and the Salesforce mobile app.
You are the Salesforce admin for XYZ Widgets. The business has asked for an Account Lightning page for the Standard User profile, which would default to show the record details and have a more user-friendly look and feel.
Now that you have this requirement, you will build a new page that you can present to the users to test.
Let’s look at how to build a Lightning page. We will start on the Setup page.
Figure 14.1: Navigating to the Lightning App Builder from Setup
Once you’re on the Setup page:
This will bring us to the Lightning App Builder detail page shown in Figure 14.2:
Figure 14.2: Lightning App Builder detail page
On this page, we will click on New, which will take us to the Lightning page creation screen, shown in Figure 14.3:
Figure 14.3: Lightning App Builder: Choose Lightning page type
On this page, we will take the following steps:
This will take us to the page shown in Figure 14.4:
Figure 14.4: Lightning App Builder: Choose label and object
On this page, we will take the following steps:
This will bring us to the page shown in Figure 14.5:
Figure 14.5: Lightning App Builder: Choose a template
On this page, we will take the following steps:
Now that we have created the page, let’s look at the sections of the Lightning page configuration page.
The Lightning page configuration page has three main sections, shown in Figure 14.6:
Figure 14.6: Lightning page configuration page
On this page, we see the following sections:
Now that we have created the Lightning page, let’s finish setting up the Lightning page by adding customizations to meet our requirements.
There are many components available to an admin. These components allow you to add sections to meet various business requirements, such as how to display the details and related items for a record. These components are dragged and dropped onto the available spaces on the template. Let’s set this page up for better usability. We will add a highlights section to the top of the page, shown in Figure 14.7:
Figure 14.7: Highlights panel
Now, we can take the following steps:
Next, let’s add the Related and Details sections. This will require a few steps, as shown in Figure 14.8:
Figure 14.8: Add tabs
The numbers in the preceding screenshot corresponds to the following information:
Next, we will add the Related Lists component, as shown in Figure 14.9:
Figure 14.9: Related tab
This allows us to take the following steps:
Next, let’s add the Details component, as shown in Figure 14.10:
Figure 14.10: Details tab
We can now follow the below steps:
Now let’s set the Details tab as the default, as shown in Figure 14.11:
Figure 14.11: Details tab default
Here, we can do the following:
Next, we will add the Activities component, as shown in Figure 14.12:
Figure 14.12: Activities component
This allows us to take the following steps:
Now we will add another tab to include the Chatter component, as shown in Figure 14.13:
Figure 14.13: Add a new tab
Here, we will do the following:
Now we will add the Chatter component to the tab, as shown in Figure 14.14:
Figure 14.14: Chatter component
We will perform the following steps:
Now that we have added all the components, let’s activate the Lightning page and assign it to the Standard User profile.
Now we will assign and activate this new page, as displayed in Figure 14.15:
Figure 14.15: Page activation
On this page, click on Activation, which will take us to the activation wizard shown in Figure 14.16:
Figure 14.16: Page activation: App, Record Type, and Profiles
On this page, click on APP, RECORD TYPE, AND PROFILE, which will allow you to select apps, as displayed in Figure 14.17:
Figure 14.17: Page activation: Select Apps
On this page take the following steps:
This will bring us to the form factor page, shown in Figure 14.18:
Figure 14.18: Page activation: Select Form Factor
On this page, we will take the following steps:
This will bring us to the record types page displayed in Figure 14.19:
Figure 14.19: Page activation: Selected Record Types
Here, we will take the following steps:
This will bring us to the profiles page shown in Figure 14.20:
Figure 14.20: Page activation: Selected Profiles
On this page, we will take the following steps:
This brings us to the final page, shown in Figure 14.21:
Figure 14.21: Page activation: Review Assignments
On this page, we will do the following:
Now that we have assigned and activated the page layout, let’s see how it looks for a standard user, as shown in Figure 14.22:
Figure 14.22: Account Lightning page
Let’s review the completed page layout:
The new layout setup is a success!
In this chapter, we learned how to create Lightning pages. We understood the different sections that make up Lightning page layouts. We added Lightning components to the layout, and finally, we explored how to assign and activate Lightning page layouts.
In the following chapter, we will cover Approval Processes.
Join our community’s Discord space for discussions with the authors and other readers: https://packt.link/rlptF