+ 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.
>> https://developer.salesforce.com/docs/component-library/bundle/lightning-tree-grid/example

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

>> https://www.salesforcecodecrack.com/2019/08/custom-search-functionality-in.html

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,