7

Correct me if am wrong in these relation Ship between Opportunity, OpportunityLineItems(Opportunity Product), PricebookEntry, Product2 & Pricebookentry in Salesforce.

  1. OpportunitylineItem is junction object between opportunity and pricebookentry. As We need PricebookEntry Id and opportunity Id while creating OpportunityLineItems.

  2. PricebookEntry is a junction object between Product2 and PriceBook. As we need Product2 Id and PriceBook2 Id while creating PricebookEntries.

Thanks in advance. :)

8

Both points are correct, see here ERD: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_products.htm

enter image description here

  • Thanks Fred, Thanks Ratan for clearing the doubt, its correct as per doc as well :) – Faiz Jan 31 '16 at 14:09
3

Opportunity Product is a Junction Object between Opportunity and Product2 objects. The API name is OpportunityLineItem.

The relationship between Product2 and PriceBookEntry is 1:M(Master Detail) with PriceBookEntry on the child side.

The relationship between PriceBook2 and PriceBookEntry is 1:M(Master Detail) with PriceBookEntry on the child side.

So PriceBookEntry is a Junction object between Product2 and PriceBook2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.