[SalesForce] Filter in Related List using fields from related record

Here is the scenario –

I am showing related orders in opportunity page layout by using related list lightning component.

Order is having two record types – say A and B.

In the Opportunity detail page, my requirement is to show only related orders having record type A.

I am not able to add filter based on order record type in Opportunity page layout. Any help is highly appreciated. Thanks.

Best Answer

There's three options available that I know of.

  • Use an existing, third party Lightning component that provides filtered related list functionality, such as this one from Salesforce Labs. (Disclaimer: not my component, and I haven't used it personally).
  • Write your own Lightning component that filters the related list appropriately.
  • Use a solution like Doug Ayers' Filter Related Lists Without Code to create synthetic related lists that are inherently filtered, and then utilize the standard Lightning related list component to show that filtered related list.
Related Topic