You need to sign in to do that
Don't have an account?
Need help with SOQL Query (Left Outer Join)
I am trying to create a query to group our Project Billing Item (custom object) by Project (another custom object). Below is a copy of my initial query:
SELECT Name, (SELECT Project__c, Name, Employee__c, Description_of_Work__c, Hours_Worked__c, Date__c FROM Project_Billing_Item__c) FROM Project__c
Which generates the following error when executing: "Didn't understand relationship 'Project_Item__c' 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."
I also tried changing it to the following:
SELECT Name, (SELECT Project__c, Name, Employee__c, Description_of_Work__c, Hours_Worked__c, Date__c FROM Project_Billing_Item__r) FROM Project__c
....and still receiving same error message stated above. If it helps Project Billing Item (Project_Billing_Item__c) has a Master-Detail relationship to Project (Project__c). Some additional information in case it helps:ks
Master-Detail Options
Related To: Project
Child Relationship Name: Project_Billing_Items
Related List Label: Project Billing Items
Thanks for the help and if I can provide any additional information that might help just let me know!
Try the following:
Check out the following link for more information on relationship queries:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm
All Answers
Try the following:
Check out the following link for more information on relationship queries:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm
Thanks, that did it! Changing Project_Billing_Item__r to the plural Project_Billing_Items__r resolved the error.