1

I am trying to query CaseComment (and Parent Case) data and need the text value of the Case record type. I have tried the methods in several other answers but always get [object Object] rather than the record type name. My query is:

select id, ParentId, Parent.RecordTypeId, Parent.RecordType.Name, Parent.CaseNumber, IsPublished, CommentBody, CreatedById, CreatedBy.UserName, CreatedBy.ProfileId, CreatedBy.FirstName, CreatedBy.LastName, CreatedBy.Email, CreatedDate, LastModifiedById, LastModifiedDate, CreatorName 
from casecomment 
where createddate = today
3

This is a limitation of the Salesforce Developer Console. It cannot output grandparent field data from a query. If you use something like the Apex Data Loader, Workbench, VS Code/Salesforce DX query commands, etc, you'll get that data as you expect.

Workbench Query

SOQL Result Data

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.