SOQL Multi level Relationships
Chapter Topics
- SOQL Basics (Salesforce Object Query Language)
- How to Write SOQL in APEX
- SOQL Variable Binding in APEX
- SOQL Keywords
- SOQL Date Literals In Salesforce
- SOQL Aggregate Query
- Child to Parent Relationship
- Parent to Child – Relationship Queries in SOQL
- SOQL Multi level Relationships
- SOQL Return Type
- Salesforce Dynamic SOQL
- SOQL ’for’ Loops
What Is Multi-Level Relationships In Salesforce?
In SOQL, you can traverse up to a maximum of five levels when querying data from child object to parent.
SELECT Name, Position__r.Contact.Account.Owner.FirstName
FROM Job_Application__c;
SELECT Name, (SELECT Name FROM Job_Applications__r)
FROM Position__c
Five Levels:
Job Application → Position → Contact → Account → User

Join our newsletter: Get daily update on Salesforce career insights & news!
Join Now!
Need more support?
Get a head start with our FREE study notes!
Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.