How to select the fields that are visible on a Related Record component on a lightning page ?

I've been through this article.

My end users need different set of fields to be visible on a Related Record component of a Lightning Page for each record type on cases. How can I assign different Related Record components to different case pagelayouts/Lightning Page ?

On cases there are 5 different case record types and for each record type they want different fields to be seen on the Related Record component of the case lightning Page.

How to implement this?

  • Is the Related Record also Case? And you currently have (and want to keep) one Lightning Page assigned to all five of the Case Record Types? Aug 13, 2019 at 20:28
  • Yes the related record is also a case AND I want to keep one Lightning Page assigned to all five of the Case Record Types?
    – Jimmy
    Aug 13, 2019 at 20:38

1 Answer 1


You can do this by creating Update Quick Actions for each Record Type, and then adding 5 Related Record components to the page, each using a different Quick Action for the fields, and then filter visibility for each component based on the Record Type.

Start by creating the Quick Actions: Setup > Object Manager > Case > Buttons, Links and Actions. Create a new Action of type Update a Record. I recommend using a Label like "RR - [RT Name]", eg, "RR - Product Support" to keep track. On the layout editor, select the fields you want to display for that record type. Repeat for each Record Type.

In Lightning App Builder, open your Case Record Page. Add a Related Record Component. Choose the relevant Lookup field, and then choose the Update Action for one of the record types. Then, under Set Component Visibility, click Add Filter, then Advanced for Filter Type. Click Select field, choose Record, and then navigate to Case Record Type > Record Type Name. (Or, if you're wanting to filter for the Record Type of the related record, navigate through the appropriate lookup relationship, and then to the Case Record Type and RT Name field). Put the Developer Name (usually has underscores instead of spaces) in the Value of the filter, leaving Equal as the Operator:

Screenshot of Component Visibility filter

Add four more Related Components, each one under the last, so you end up with 5 stacked on top of each other. Set the Quick Action and Component Visibility for each of the Record Types. Save everything, and users will only see the Related Record component corresponding to the correct Record Type when they look at the record page.

  • Thank You So Very Much Sir
    – Jimmy
    Aug 13, 2019 at 21:47
  • 1
    You're welcome. Here at SFSE, we show thanks not with comments, but with upvates and selecting as the correct answer when appropriate. Aug 13, 2019 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .