You need to sign in to do that
Don't have an account?
AlexCRMmanager
OpportunityLineItems relationship query
I'm having trouble figuring out the right syntax to get the following data using a SOQL relationship query:
Product Code, Quantity, Total Price, Product Name
from Products and Opportunity Line Items
for a specific OpportunityID
Can anyone tell me how I need to write my SOQL query to get this data?
Many thanks.....
Product Code, Quantity, Total Price, Product Name
from Products and Opportunity Line Items
for a specific OpportunityID
Can anyone tell me how I need to write my SOQL query to get this data?
Many thanks.....
This requires requesting data from a couple of different tables. I got this to work using this:
I added the line breaks for readability, of course.
Thanks very much for your quick reply to my post!! Your query was the framework that I needed to get my SOQL relationship query to work. Here is the final product:
Code: (Once again, line breaks for readability)
This query gets the ProductCode and ProductName from the Product2 object through the relationship in the PricebookEntry object.
The reason I couldn't get it to work initially was that I didn't know the right syntax to use, and I didn't realize that I needed to start the query on the Opportunity object.
Thanks again,
AlexCRMmanager
Message Edited by AlexCRMmanager on 04-05-2007 09:03 PM