Friday, May 20, 2011

Tip's to migrate data into Opportunity Line Item object in salesforce

To load data into Opportunity Line Item(OLI) Object in salesforce using CLI or GUI Apex data loader or any data migration tool few things important to take care at the time of data migration into OLI.

  1. TotalPrice field is nullable, but you cannot set both TotalPrice and UnitPrice to null in the same Insert,update and Upsert call.
  2. UnitPrice field or TotalPrice is required. You cannot specify both.
  3. If you specify Discount and Quantity, UnitPrice field or TotalPrice is required.
  4. At the time of data migration if you found Error "FIELD_INTEGRITY_EXCEPTION:field integrity exception: PricebookEntryId, unknown (versions 3.0 and higher must specify pricebook entry id; others must specify product id)Error fields: PricebookEntryId unknown". It's means that either PricebookEntryId fields contain null value or ProductId there in PriceBookEntry Object related to this PriceBookEntryID is incorrect.
  5. At the time of data migration if you found Error "FIELD_INTEGRITY_EXCEPTION:field integrity exception: unknown, unknown (versions 3.0 and higher must specify pricebook entry id; others must specify product id)Error fields: unknown unknown". It's means that either PricebookEntryId fields contain null value.