• IraH
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

I have this query and tested in Setup/System Log/ Execute Apex and it works fine.

SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contacts) FROM Account

 

However, I plugged this query in my app and it doesn't work.   and it give me this error.

INVALID_TYPE: sObject type 'account.contacts)' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

If I remove  (SELECT Contact.LastName FROM Account.Contacts), then it works fine.

Any advice?

Thanks,