I'm trying to construct a query that takes a specific
Contract with a provided
Id, and I want to fetch from this record, the related
Order's, and their
So If I understand correctly I would need to do as a first instance, where
sid is the provided ID.
SELECT Id, Name, Account.Name, (SELECT Id, Name FROM Order) FROM Contract WHERE ID = :sid
And the Error I get, is the following, but so far, I don't understand If I'm constructing the query in the wrong way, or what am I doing wrong in general with this, I want to avoid multiple SOQL, because of a POST-Query Manipulation I want to save EXEC-time, with doing only one query.
(SELECT Id, Name FROM Order) ^ ERROR at Row:4:Column:30 Didn't understand relationship 'Order' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Any Idea, how can I do this better?