0

I am trying to retrieve the parent fields of a child object which is already inside of a parent to child query. I do understand that the retrieving polymorphic fields dont work on joins based on this post Child to parent SOQL query inside a parent to child query.

In my case I am not pulling any polymorphic fields just the custom fields of the custom object. I am not getting any errors on the query, so I believe I am using the right relationship names to access the fields.

Here is the query -

SELECT Id, CaseNumber,(SELECT Equipment__c, Equipment__r.Name, Equipment__r.Maintenance_Cycle__c FROM Equipment_Maintenance_Items__r) FROM Case where CaseNumber ='00001026'

Here is the result of the query for which I am getting Object Object for the Equipment__r.Name & Equipment__r.Maintenance_Cycle__c fields -

enter image description here

1 Answer 1

1

The data is being returned, but the Developer Console's Query tab doesn't support grandparent (or higher) parent relationships, or relationships from child objects. Try using the Workbench instead.

1
  • Thanks sfdcfox for the reminder.
    – sumchans
    Commented Apr 14, 2022 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .