#1MinuteTip #SalesforceSummer24 Apex now supports SOQL relationship queries that traverse up to five levels of parent-child records. Each parent-child relationship subquery counts towards the number of aggregate queries processed in an SOQL query statement.
Product Area: Apex
List<Account> accts =
[SELECT Name,
(SELECT LastName,
(SELECT AssetLevel,
(SELECT Description,
(SELECT LineItemNumber FROM WorkOrderLineItems)
FROM WorkOrders)
FROM Assets)
FROM Contacts)
FROM Account];
References & Useful URLs
- For Related Summer ’24 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.