Skip to main content

Timeline for SOQL Sub-Query on child of child

Current License: CC BY-SA 4.0

5 events
when toggle format what by license comment
Jul 15, 2022 at 16:32 vote accept Scott B
Jul 15, 2022 at 16:32 comment added Scott B I can't though. The problem is that this is a query from a separate system that can only issue a single query to get the results it expects. I could easily do it from Salesforce/Apex, but don't think it is possible with the single query requirement.
Jul 7, 2022 at 20:21 comment added Derek F @ScottB You can still break it into two separate queries and stitch the results together a la my second example before returning the result.
Jul 7, 2022 at 20:00 comment added Scott B Thank you for this great explanation. Unfortunately, in the much longer query, I do need to base it off of the orderitems. I think I'm going to have to use some automation to populate a field on the opportunity when an OpportunityPartner of the appropriate type is created.
Jul 7, 2022 at 14:21 history answered Derek F CC BY-SA 4.0