You need to sign in to do that
Don't have an account?
suji srinivasan
how to query from grandchild to parent in soql?
I created subcontact__c object and created lookup relationship with contact .child relationship Name -subcontacts
1.I tried to query child to parent
select Name, Account.Name from Contact - got response
2.when i trield to query grand child to parent getting error
select Name, Contact.Account.Name from subcontact__c - got error
Can you clarify me, why i didnt get response?
Thanks in Advance.
1.I tried to query child to parent
select Name, Account.Name from Contact - got response
2.when i trield to query grand child to parent getting error
select Name, Contact.Account.Name from subcontact__c - got error
Can you clarify me, why i didnt get response?
Thanks in Advance.
The query should be as below.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
What is the Contact API name in the subcontact__c object?
Thanks,
Contact__c is the Contact API name in the subcontact__c object
The query should be as below.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,