You need to sign in to do that
Don't have an account?

Display Child-Parent Records
Hello Board,
How to loop through child objects, find the parent records?
Child 1
Parent 1
Child 2
Parent
Summary by Child object
Thanks,
Devendra
You need to sign in to do that
Don't have an account?
Hello Board,
How to loop through child objects, find the parent records?
Child 1
Parent 1
Child 2
Parent
Summary by Child object
Thanks,
Devendra
Hi,
You have to simply make the SOQL to get the parent record like below:
List<string> parentObjectName=new list<string>();
For(childObject__c chld :[select id,name ,parentObject__c from childObject__c])
{
parentObjectName.add(chld. parentObject__c);
}
System.debug(‘@@@@@@@@@@@@@@@@@@@’ + parentObjectName);// will display all the parent records name
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks Navtar,
I want to display these parent records on VF page in following manner.
How to display these records on VF page?
Thanks,
Devendra