You need to sign in to do that
Don't have an account?
TheRealMarchandoj
How to query OrderItems from Opportunity
I need to build a query which allows me to pull back, Opportunity Line Items, Opportunity, Order and Order Items.
I've started writing the query on Opportunity, but I cannot figure out how to query the Order Items, as I am still getting my head around SOQL.
Can someone help point me in the right direction?
Thanks
I've started writing the query on Opportunity, but I cannot figure out how to query the Order Items, as I am still getting my head around SOQL.
Can someone help point me in the right direction?
Thanks
SELECT Id, Order__c, Order__r.CreatedDate, Owner.Name, (SELECT Id, Training__c, Scrappage_Cost__c, Misc_Cost__c FROM OpportunityLineItems) FROM Opportunity WHERE RecordType.DeveloperName != 'CoolAir_Quote' AND Order__c != ''
[1] http://salesforce.stackexchange.com/questions/47955/how-can-i-query-orders-to-get-orderitems-associated-with-that-order
[2] https://developer.salesforce.com/blogs/developer-relations/2015/02/using-metadata-api-describe-objects.html