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
dotnetericdotneteric 

I can query Task object for CreatedBy.TimeZoneSidKey, but not Owner.TimeZoneSidKey?

Can someone please help me out?  I can perform the following query:
 
select CreatedBy.TimeZoneSidKey from Task Limit 1
 
but the following fails telling me that TimeZoneSidKey is not a valid field on "Owner":
 
select Owner.TimeZoneSidKey from Task Limit 1
 
 
What gives?  Querying Owner.TimeZoneSidKey on a few other objects that I tried works:
 
select Owner.TimeZoneSidKey from Opportunity Limit 1
SuperfellSuperfell
depending on the sobject, owner can be a reference to just User, in which case owner.TimeZoneSidKey is valid, on other objects, the owner relationship is polymorphic (it points to different types, e.g. User & Queue), in which case you can only query the small subset of fields that are on the Name entity.
dotnetericdotneteric
Makes perfect sense.  Thank you!