function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DanGDanG 

Joining Products and Opportunity Lineitems?

I am trying to run various reports that would get the OpportunityLineItem with the Product name.  But the Product ID in the OpportunityLineItem table doesn't correspond to the Product ID in the Product2 table.

How can I join OpportunityLineItems with Product2?  Suggestions?

Thanks in advance,
Dan
Ron HessRon Hess
oh, but were it that simple.

these two tables are joined together by a third table, the PriceBookEntry.

so, OpportunityLineItem is related to PriceBookEntry, which in turn holds a ProductID, which can be used to get a Product Name.


IWyattIWyatt
I've noticed the same is true for Leads to Campaigns. Although it would make sense to look for the LEADid IN CAMPAIGNid, I've found that the CAMPAIGN MEMBERS table actually joins them.
 
The frustrating part is that it seems like I should be able to use the "IN" lookup for the LEADid in the Campaign Members table - but for whatever reason (datbase table setting perhaps) - it doesnt let me.
 
So I have resorted to using a query, then a cell-lookup reference, and finally a REFRESH query to get my data. A 3-step process which I would prefer to take only 1.
 
I'd be interested in finding out if there is any more information about this topic.
 
-IW