Experience Salesforce
SOQL Multi level Relationships
What You’ll Learn
- What Is Multi-Level Relationships In Salesforce?
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
Next TopicNeed Extra Support? Our FREE study materials have got you covered.
Our expert-prepared study materials provide the answers you need. Clear your doubts and improve your skills with detailed notes from industry professionals.