You need to sign in to do that
Don't have an account?
soql sub quer error
Hi
i have two objects quote (parent ),purchase order(child)
am writing sub query but am getting error
please tell me can any where am missing
List<Quote__c> quotes = [Select id,Height__c,Width_Forula_C2__c,(select id,Height_Num__c,Quote__c,Product_Code__c,Width_Num__c from Purchase_Orders__r) From Quote__c where Id in: mapOrderIdAllsco.keyset()];
am getting this error
Didn't understand relationship 'Purchase_Orders__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
regards
venkatesh
The relationship names differ from the API names. Select this child query from eclipse IDE schema. You will get proper relationship names
All Answers
Hi,
try this
List<Quote__c> quotes = [Select id,Height__c,Width_Forula_C2__c,(select id,Height_Num__c,Quote__c,Product_Code__c,Width_Num__c from Quote__c.Purchase_Orders__r) From Quote__c where Id in: mapOrderIdAllsco.keyset()];
Go for this link for more information
http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm
Hit kudos (star) if this solution helped you
The relationship names differ from the API names. Select this child query from eclipse IDE schema. You will get proper relationship names