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
bennyfajbennyfaj 

Parent field Querie on certain Obejcts lile EmailMessage

Hello

I am using the Apex Explorer to build my Queries for my S-Control.
The problem is that access to Parent fields on certain object are not working.

Here are two similar queries on different objects.

This is a Query on the Object : CaseComment that works fine
(for c.Parent.Subject)

Select c.Id, c.ParentId, c.CreatedBy.FirstName,c.CreatedBy.Type,
c.Parent.Id, c.Parent.Origin, c.Parent.OwnerId, c.Parent.Subject, c.Parent.Contact.FirstName, c.Parent.Contact.LastName, c.Parent.Account.Name, c.Parent.Owner.Alias,
from CaseComment c

This second similar Query on Object : EmailMessage does not work
(for e.Parent.Subject)

Select e.FromAddress, e.Id, e.Incoming, e.MessageDate,
e.ParentId, e.Parent.Subject
from EmailMessage e

Thanks for the help
Benny