#SalesforceSummer23 – Query Five Levels of Parent-to-Child Relationships in SOQL Queries

#1MinuteTip #SalesforceSummer23 SOQL now supports relationship queries that traverse up to five levels of parent-child records. Use a single SOQL query to get parent-child records from five different levels.

This ability is limited to SOQL queries via the REST and SOAP query calls on standards and custom objects.

Product Area: Development -> API

    (SELECT LastName,
        (SELECT AssetLevel,
            (SELECT Description,
                (SELECT LineItemNumber FROM WorkOrderLineItems)    
            FROM WorkOrders)    
        FROM Assets)    
    FROM Contacts)    
FROM Account

SOQL Source: Summer ’23 Release Note Article (link below)

References & Useful URLs

  • For Related Summer ’23 Release Note Article – Click Here

Want to Receive these Tips in your Inbox?

Finding it overwhelming to keep pace with Salesforce’s new release features? Try our “1 Day 1 Tip 1 Minute” emails, where you are going to get 1 tip every day that won’t take more than a minute to read. To find out more and subscribe please click here.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass