+ Start a Discussion
manan patel 7manan patel 7 

Join query in salesforce

select Name, (Select id, Name from Transaction__r) from Account where Parent.Name !=null 
i am new in salesforce i not know to how to get transcation__r values in my vf pages please help me for that.
Karan Shekhar KaulKaran Shekhar Kaul
List<Account> accList  = [Select Name, (Select id, Name from Transaction__r) from Account where Parent.Name !=null ];
List<Transaction__c> transactionList = new List<Transaction__c>();
for(Account accObj :accList   ){
if(accObj.Transaction__r != null )
 transactionList .add(accObj.Transaction__r);
}
Karan Shekhar KaulKaran Shekhar Kaul
Does this answer your question?