Select Name, Contact.Name ,Pension_Contract__c.Contact.Account.Name From Pension_Contract__c Where Signing_Status__c = 'Completed'
Why do I get this error ?
Is this the wrong way of querying from child to parent ?
Select Name, Contact.Name ,Pension_Contract__c.Contact__r.Account__r.Name ^ ERROR at Row:1:Column:14 Didn't understand relationship 'Contact' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Pension_Contract__c
your relationship field fromPension_Contract__c
toContact
? If so, the 2nd field in your SOQL needs to traverse through the custom relationship.