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
Bhuvaneswary RBhuvaneswary R 

How to populate Related List of current record (Any object) in Lightning component

I am developing a Lightning Component which I want to add to any Salesforce object. I need to get Child records of the current record in my Apex controller. It is something similar to Related List Standard component we have. 
For Eg: If I open an opportunity record, I need to get all Opportunity Products associated to this Opportunity in my Lightning component.
I am facing challenge here as I can add this component to any Salesforce object and Object Name, Type, RelatioshipName are dynamic.
NagendraNagendra (Salesforce Developers) 
Hi Bhunvaneswary,

There is no way to use Standard lightning app-builder components from your lightning component code. Maybe to show a list you can use the new lightning:datatable https://developer.salesforce.com/docs/atlas.en-us.210.0.lightning.meta/lightning/aura_compref_lightning_datatable.htm base component.

Hope this helps.

Kindly mark this as solved if my reply was helpful.

Regards,
Nagendra