I have the following situation
- Object MortgageApplication: has a lookup field called PrimaryLoanApplicant. The lookup is against Object Loan Applicant. The child relationship name is called LA
- Object Loan Applicant: Has a look up field called contactid. The lookup is against Contact object. The child relationship name is called CLA
I am trying to get the Applicants name from the Contact object along with some other fields/details from Mortgage Application object.
MortgageApplication ma = [SELECT Id, Name, Status, (SELECT contactid__r.name from la__r), Amount_of_Funding_Required__c FROM MortgageApplication WHERE Id =:sbaId]
When I write the following, I get 'Didn't understand relationship __r error'.
I am getting this terribly wrong. Can someone give me a tip on how to get this query working?