function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
akshay desai 9akshay desai 9 

How to show parent as well as child record in LWC Search

I have a parent Account and a child account
whenever user search for either on I want to show  the search record with parent and child as well
I want to show like 
Parent then below that there childs like
ANUTEJANUTEJ (Salesforce Developers) 
Hi Akshay,

There is no same implementation that is present but I think you can combine the below solutions to have something that meets your requirement.

For showing a parent record and related child records you can have a lightning- tree grid.

To build a search functionality you can use the below example:


Let me know in case if there are any issues and in case if this comes in handy can you please choose this as the best answer so that it can be useful for others in the future.

Raghu Ramanujam 4Raghu Ramanujam 4

Hi Akshay,

Having a similar requirement, how did you acheive this?



Siva T 14Siva T 14
Hi Akshay,

Did you get solution for this,