Working with existing Lightning page layouts – Lightning versus Classic – Lightning Experience

Let’s now see how to work with Lightning page layouts:

  1. To edit a Lightning page layout, you need to access the Lighting App Builder on the object that you want to set up. Just open any record of this object, click the Setup button located on the top of the page, and choose the Edit Page option:

Figure 4.6: Opening Lightning App Builder

2. You will see the Lightning App Builder interface – Lightning App Builder is a feature created to edit page layouts in the Lighting user interface:

Figure 4.7: Lightning App Builder

  1. To add new fields to the canvas, you need to use a Salesforce feature called Dynamic Forms. Dynamic Forms is a feature that transitioned the setup of record field visibility from the Salesforce Classic user interface to Lightning. In simple terms, before Dynamic Forms, you need to edit the Salesforce Classic interface to place or rearrange fields on the record canvas even if you were already using the Lightning interface. With the introduction of Dynamic Forms, you can now do this within the Lightning interface. To utilize this feature, click on the Record Details component (the one displaying all the fields in a single component) and then select the Upgrade Now action button on the right-hand side:

Figure 4.8: Lightning App Builder – Dynamic Forms

  1. Follow the steps on the screen to convert record details to Dynamic Forms:

Figure 4.9: Lightning App Builder – Dynamic Forms conversion

  1. Select which Salesforce Classic page layout will be the source for your Dynamic Forms:

Figure 4.10: Lightning App Builder – Dynamic Forms conversion

  1. After the upgrade, a new subtab called Field will appear in Lightning App Builder, and you will see that the component that was displaying all the fields together has changed, and now you will be able to decide about fields separately:

Figure 4.11: Lightning App Builder – Dynamic Forms conversion

  1. Here are some things you can do with a field in Dynamic Forms:
    • Move on the canvas – place fields in different places on the user interface
    • Create field sections and place field/s in the proper field sections
    • Set UI behavior – you can set the field to Read-Only or Required
    • Set field visibility – you can decide when the field will be visible for the user. For example, you can display the Account field rating only when the Account type is Prospect. Now, this is quite a powerful feature that was not in the Salesforce Classic interface. Before Dynamic Forms appeared in Salesforce, to achieve a similar outcome, you needed to use custom code written by a programmer:

Figure 4.12: Lightning App Builder – Dynamic Forms converted filters
• Use Tabs and/or sections to arrange fields, related lists, and custom components on the record page layout – you can set the default tab and order tabs the way you want:

Figure 4.13: Lightning App Builder – Dynamic Forms converted tabs

Sections can be created using the Field Section feature, as shown in the next screenshot:

Figure 4.14: Lightning App Builder – Dynamic Forms converted sections

To save your page, just click the Save action button on the right-hand side of the user interface. You will be also asked about activation. You can choose the Org Default option, and that’s it!

Tip

When using Tabs, try to “hide” related lists in non-default tabs. This is the recommendation from Salesforce to enhance the speed and performance of Lightning Experience pages. Hiding these lists can speed up page loading because Salesforce won’t have to display lists that often contain many records every time you enter the page. Salesforce suggests placing only the most important information in default tabs.

Okay – now that we know how to edit a Lightning record page, what about a Classic page layout? Should you even be concerned? The answer is yes, you should. At least at the time of writing this book, there were still some limitations related to Dynamic Forms on certain Salesforce standard objects. For example, Dynamic Forms aren’t supported on objects that are not LWC-enabled. Objects such as Campaigns, Products, and Tasks, which are not LWC enabled, still rely on information from page layouts. Additionally, there is currently no way to configure record header fields using Dynamic Forms in the Lightning interface. To accomplish this, you need to edit the Salesforce Classic compact layout. For these reasons, you will still need to work with Salesforce Classic page layout features from time to time. But don’t worry – let’s explore together how things are structured there.

Leave a Reply

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