You need to sign in to do that
Don't have an account?
Sathya C
//The code below to get parent record when child information does not.
I tried to get custom child record when parent object information is given. But, How to query for custom parent record when custom child field is given?
// student__c is child, college__c is parent. The below code to get the child record when parent information is given works
{
{
student__c [] a = [select id, name, date_of_birth__c, phone__c, email__c, address__c from student__c where college_name__r.name = 'PEC College'];
for(student__c s:a)
system.debug(s);
}
for(student__c s:a)
system.debug(s);
}
//The code below to get parent record when child information does not.
{
college__c a = [select id, name, address__c, courses_offered__c, dean_name__c, number_of_students__c, year_started__c
from college__c where id in (select student__r where student__c.name = 'Claire Hale') ];
}college__c a = [select id, name, address__c, courses_offered__c, dean_name__c, number_of_students__c, year_started__c
from college__c where id in (select student__r where student__c.name = 'Claire Hale') ];
Hope it helps you.
Thanks,
Anjith kumar.
Its still not working
Thanks,
Anjith