Master the concepts of Salesforce in just 45 days Click here to know more.
Are you a smart person who loves to communicate with people? If yes, then join us as a Business Development Executive.
Relationship queries involve at least two objects, a parent and a child. These queries are used to fetch data either from the Parent object, when SOQL query is written on child, or from child object when SOQL query is written on parent.
SELECT relationship_field.parent_obj_field FROM child_object;
List<Opportunity> oppList = [SELECT name, amount, closeDate, account.name
for(Opportunity o: oppList)
System.debug(‘Opp: ‘ + o.name + ‘ Acc: ‘+o.account.name);
SELECT (relationship_field)__r.parent_obj_field FROM child_object;
List<Branch__c> branchList = [select Branch_ID__c, State__c,
Branch_of_Bank__r.Bank_Name__c from Branch__c];
for(Branch__c bl: branchList)
System.debug(‘Bank Name: ‘+bl.Branch_of_Bank__r.Bank_Name__c
+ ‘Branch: ‘+bl.State__c);
< < 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.