Related List Cannot Be Displayed

When building Lightning Page Layouts, you may encounter a Lightning Component that appears blank. You put the Component on the page in Lightning App Builder, only to find it is missing when you check on an actual record.  In the Lead below, clicking on the Files tab reveals a blank space instead of a list of Files. To the end user it looks like I simply forgot to put something on that Tab.  In looking under the hood we’ll discover that the Component cannot be displayed.

Missing Lightning Page Component

Use Setup to Edit Current Page in LightningInvestigate Page Layout using Lightning App Builder

To investigate further, as a System Administrator I edit the Page in Lightning App Builder. The Gear which gives access to Setup also gives an easy back door to open this exact Lightning Page Layout in Lightning App Builder. Once there I look at the Files Tab and see a message stating “This related list cannot be displayed because it is not in the current page layout.”  This somewhat cryptic message indicates that the Related List in question is not on the Page Layout in Classic.  In part because it is not clear what it is telling me, and in part to be thorough, I’ll click on the Related List Component in question and give a quick once over on its Properties.

Related List Cannot be Displayed

Related List Component Properties

Quick Sanity Check of the Related List Properties

Until you click on the Related List Component, from this message you can’t actually tell what Related List we intended. Perhaps I mistakenly selected one I’d never want to use?  By clicking on the Component, we see in Properties  that the Related List is correctly trying to pull in Files. Down below, we also see that no Filter controls Component Visibility. There are no Filters, so that is not our culprit. What need to edit the Classic Page Layout, and add the Files Related List.  We can check this assignment by clicking on the Assign Page Layouts link in the same Properties.  This shows us all Profiles, and the Classic Page Layout assigned to each Profile.

If you converted from Classic to Lightning recently this might be a real use case for you. In Classic we always used the Notes and Attachments Related List. In Lightning we move toward the more powerful and updated Files Related List which is part of Chatter Files. To use Files on a Lightning Page Layout, you need to add it to the Classic Page Layout.

Adding the Files Related List to a Classic Page Layout

Editing the Page Layout in Classic is easy. Simply click on the Related Lists menu item. Then drag ‘Files’ down onto the Page Layout down under the Related Lists section.

Adding the Files Related List to a Classic Page Layout

Once we save this tiny change we can return to the Lead in question and reload the page in the browser to see the Related List.

Files Related List Restored to Page Layout