You need to sign in to do that
Don't have an account?
Mel Lisau
I have a SOQL call as follows:
select Account.AccountNumber, Account.AccountSource, Account.Active__c, Account.AnnualRevenue, Account.BillingAddress,
Account.CreatedById, Account.CreatedDate, Account.CustomerPriority__c,
Account.Name, Account.NumberOfEmployees, Account.NumberofLocations__c, Account.OwnerId, Account.Ownership,
Account.Site, Account.SLA__c, Account.SLAExpirationDate__c, Account.SLASerialNumber__c,
Account.SystemModstamp, Account.TickerSymbol, Account.Tradestyle, Account.Type, Account.UpsellOpportunity__c,
(select Sequence__c, Action__c from AcmeCo_Account_c__r where Processed__c = false and IDM__c = 'TEST1' )
from Account where Account.Id in (select Link__c from AcmeCo_Account__c where IDM__c = 'TEST1' and Processed__c = false)
But it give an error:
(select Sequence__c, Action__c from AcmeCo_Account_c__r where Processed__c
^
ERROR at Row:17:Column:40
Didn't understand relationship 'AcmeCo_Account_c__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.
The custom table is created .
How can i avoid this or correct the query ?
thanks
Why am i getting "Didn't understand relationship" in my SOQL call ?
I have a SOQL call as follows:
select Account.AccountNumber, Account.AccountSource, Account.Active__c, Account.AnnualRevenue, Account.BillingAddress,
Account.CreatedById, Account.CreatedDate, Account.CustomerPriority__c,
Account.Name, Account.NumberOfEmployees, Account.NumberofLocations__c, Account.OwnerId, Account.Ownership,
Account.Site, Account.SLA__c, Account.SLAExpirationDate__c, Account.SLASerialNumber__c,
Account.SystemModstamp, Account.TickerSymbol, Account.Tradestyle, Account.Type, Account.UpsellOpportunity__c,
(select Sequence__c, Action__c from AcmeCo_Account_c__r where Processed__c = false and IDM__c = 'TEST1' )
from Account where Account.Id in (select Link__c from AcmeCo_Account__c where IDM__c = 'TEST1' and Processed__c = false)
But it give an error:
(select Sequence__c, Action__c from AcmeCo_Account_c__r where Processed__c
^
ERROR at Row:17:Column:40
Didn't understand relationship 'AcmeCo_Account_c__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.
The custom table is created .
How can i avoid this or correct the query ?
thanks
All Answers
(select Sequence__c, Action__c from AcmeCo_Account__r where Processed__c
^
ERROR at Row:17:Column:40
Didn't understand relationship 'AcmeCo_Account__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.
Now i assume i check the schema of Account ?
These relationships are created by the user who creates the .net app ie to register classes etc ?
It is actually AcmeCo_Account_c__r (single _ before the c) ? Thats whats a bit confusing
I cant keep referring to the WSDL because I generate SOQL queries and try to run them and hence it errors becuase its the wrong relationship name in the query.
But thankyou for the help