You need to sign in to do that
Don't have an account?

Querying master-detail / related list with SOQL
Hello,
I have a custom object I use for data about events at my organization MyEvent__c, and a connector object for tracking RSVPs to the events, RSVP__c.
I'm trying to query the RSVPs but can't seem to get a query to work. The RSVP__c object connects to the event object with a Master-Detail(Event) field.
I'm trying to test queries with the Apex Explorer and I can't get the most basic SOQL queries to work:
Select Id from RSVP__c
Returns Error: Query failed: INVALID_TYPE: sObject 'RSVP__c' is not supported.
Select e.Id,e.Event_Title__c, (Select Id,Name from RSVP__r) from MyEvent__c e where e.Id = 'a0A7xxxxxxxxxxx'
(with a valid id in there) returns error:
Query failed: INVALID_TYPE ... (query)
ERROR at Row:1:Column:52
Didn't understand relationship 'RSVP__r' 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.
The WSDL has the relationship in there in the MyEvent__c object:
<element name="RSVP__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>
I have no idea why this is not working. My guess is that it's a permissions thing or a namespace thing, but I don't know.
Any help would be greatly appreciated.
Thanks,
-paul
All Answers
That was it.
Thanks for that and for such a fast reply, I don't think I would have ever thought to check that.
-paul