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
Mario PMario P 

SOQL statements can't query related data

Hi,

I tried one standard query from Apex Web Services API Developer's Guide topic Relationship Queries
======
SELECT Contact.FirstName, Contact.Account.Name from Contact
======
and I received an error: "SOQL statements  can't query related data"

When I try to create querues using just only one object/table it works fine, but when there are more than one - it fails.

As I understand sample queries (from RTFM) with predefined objects/tables should work fine.

What the problem is?

Thanks a lot in advance.