I have the next SOQL:
SELECT Ap_Mat__c,Ap_Pat__c,Email__c,Cuenta__c,Nombres__c, Scheme__c
FROM Asociado__c LIMIT 100
Where Cuenta__c is a master-detail field and Cuenta__c is the master(Account). On my SOQL I want the Account's name but this return the ID. I try to change to:
SELECT Ap_Mat__c,Ap_Pat__c,Email__c,(SELECT Account.Name FROM Account), Cuenta__c,Nombres__c, Scheme__c FROM Asociado__c LIMIT 100
And get this error: "idn't understand relationship 'Account' 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". Or change to this:
SELECT Ap_Mat__c,Ap_Pat__c,Email__c,Account.Name , Cuenta__c,Nombre_s__c, Scheme__c FROM Afiliado__c LIMIT 100
Also getting error: "Didn't understand relationship 'Account' in field path. 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."
I need the same for , Scheme__c field. it's also a master-detail field where , Scheme__c is the master in a custom objet. Could you help me please. I do not quite understand how to structure the query
SELECT Ap_Mat__c,Ap_Pat__c,Email__c, Cuenta__r.Name , Nombre_s__c, Scheme__r.Name FROM Asociado__c LIMIT 100