Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. :)

share|improve this question
up vote 4 down vote accepted

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

enter image description here

share|improve this answer
    
Thanks Fred, Thanks Ratan for clearing the doubt, its correct as per doc as well :) – Faiz Jan 31 at 14:09

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

share|improve this answer
    
That's absolutely right, Thanks Bennie :) – Faiz Jan 31 at 14:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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