function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Christopher MilnerChristopher Milner 

SOQL Query Across 3 Objects (2 Standard and 1 Custom)

I am attempting to generate a SOQL query across the following three objects:
  • Account (standard).
  • Cases (standard).
  • Workfront__c (custom object housing implementation project information; related to Account via lookup field 'WkFrontSFAccount').

Most of our accounts have a related workfront project (when new customers purchase implementation), and within the project information there is a "project manager" field. At the end of the day, I would like to generate a list of cases, grouped by Account for any Account that had an implementation project where the project manager = "X".

Example: Say accounts "A1" and "A2" were implemented by "John Doe". I would like a SOQL query that returns cases for A1 and A2 but no other cases and grouped by the account name. Thanks in advance if anyone can assist here! Really just getting my feet wet with SOQL; a 3 layer query is giving me some issues.