function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
penchala rajupenchala raju 

Can we fetch Customer__c (Master1) and Loan__c(Master2) record details from Corresponding child record (Transction__c) using SOQL

Best Answer chosen by penchala raju
Yes you can. I am assuming Customer__c has a lookup with relationship name Customer__r and Loan__c has a lookup with relationship name Loan__r on child object Transaction__c then this query will fetch your desired details,
Select Customer__r.Name, Loan__r.Name From Transaction__c