I have 2 Custom Objects,
Child has a lookup relationship with
If I query
Parent__c on the Child object, I get back the Parent object's Id, which is correct,
But if I query
Parent__r.Name, I get the following error:
Invalid field Parent__r.Name for Child__c
So it's not getting to my Parent object at all.
As a test, I queried for a field I knew was not on the Parent object,
And I got the following error:
No such column 'noField__c' on entity 'Parent__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
So for that query, it made it to my Parent object, but failed because the field is not there.
Can anyone possibly explain why the first query for
Parent__r.Name might be failing before it even reaches my Parent object?
String soql = 'select id, name, Parent__r.Name from Child_c';