This post is a continuation of my earlier post on Product, Pricebook and Pricebook entry.Opportunity Product(line item) is a junction object between opportunity and pricebookentry table.
List of fields in opportunity products
Notes on loading
List of fields in opportunity products
- ID
- OPPORTUNITYID
- PRICEBOOKENTRYID
- CURRENCYISOCODE
- QUANTITY
- TOTALPRICE
- UNITPRICE
- LISTPRICE
- SERVICEDATE
- DESCRIPTION
Notes on loading
- pricebook entry should be in the same pricebook that is assigned to the opportunity. The pricebook name can be found in pricebook2id field in opportunity
- If the opportunity does not have an associated pricebook2, the API automatically sets the pricebook on the opportunity if the line item corresponds to a Pricebookentry in an active Pricebook2. Changing the pricebook association would delete existing opportunity line items.
- Creating an OpportunityLineItem increments the OpportunityAmount value by the TotalPrice of the OpportunityLineItem. Additionally, inserting an OpportunityLineItem increments the ExpectedRevenue on the opportunity by the TotalPrice times the opportunity Probability.
- The OpportunityAmount becomes a read-only field when the opportunity has line items.
- If multi-Currency is enable for your organization, Choose a price book that contains products with the same currency as the opportunity. pricebook entry currency code should match opportunity currency code.You cannot update the CurrencyIsoCode field on the opportunity if line items exist.