Master the concepts of Salesforce in just 45 days Click here to know more.
Premium Salesforce Weekend Batch Start From Tomorrow.
SELECT (SELECT child_obj_field FROM child_relationship_name) FROM parent_object;
List<Account> accList = [select name, numberOfEmployees, (select name, amount,
closeDate from opportunities) from Account];
for(Account a: accList)
System.debug(‘ACC: ’ + a.name + ’ NoEMpl: ’+a.numberOfEmployees.;
List<Opportunity> oplist = a.opportunities;
for(opportunity o: oplist)
System.debug(‘opportunity name:’ + o.name + ‘Amount: ’+a.amount);
SELECT (SELECT child_obj_field FROM (child_relationship_name)__r)
List<Bank__c> bankList = [select Bank_Name__c, (select Branch_ID__c, Name,
State__c from Branches__r) from Bank__c];
for(Bank__c ba: bankList)
List<Branch__c> branchList = ba.branches__r;
for(Branch__c br: branchList)
+’|Branch Name:’+br.Name+’|Branch State:’+br.State__c);
Note: You can not write a subquery inside a subquery in SOQL.
< < Previous
Next > >
The batch is going to start shortly. Fill the form given below to Register yourself now.
Fill out the form and get consulted by our Salesforce experts.
Fill out the form to figure out to detemine the perfect Salesforce profile for yourself.
Fill the form below to get a demo of this course.
Fill out the form to get your Premium Salesforce Development Course
Online Salesforce Development Course is soon going to be launched. Please fill the form and we will notify you about the course.