Adventures on the edge

Learning new development technologies
    "When living on the bleeding edge - you sometimes have to bleed" -BillKrat

Salesforce SOQL subquery on custom objects

                               Master: LMSF_Code_Review__c
                                 Detail: LMSF_Use_Case__c
Child Relationship Name:  Child_Reviews   (reference green oval below)

In the subquery you have to append a “__r” to the child relationship name, e.g.,

select Id, Name, (Id, Name from Code_reviews__r)
  from LMSF_Use_Case__c
where Name Like ‘UC020-0100%’
order by Name

subquery

Comments are closed