0

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.

1

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.
  • Thank you David. I am able to implement this with Doug Ayers' solution. – Sudipta Deb Apr 23 at 22:49
1

I am not able to add filter based on order record type in Opportunity page layout.

You won't be able to do so as the filters available are based on your current record. In your case you have child records that you are displaying in a related list and that you cannot utilize filtering here. You can only choose fields available on the record or related to the record.

On record pages, you can choose record fields or advanced fields, such as fields from related objects or from a global object like User.

Your options here to be able to display filtered related list are either to create a custom component or utilize this configurable solution (I know this works great as I had used this in one of my implementations) or utilize any third party solution if there are any available on app exchange.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.