0

Scenario: There are multiple Order Products with different Pricebook(Year wise Pricebook) to be added on Order Object. But, on Order Object we can only set a single Pricebook Id.

Can anyone please give a workaround to deal with this situation?

Thanks in advance.

0

SFDC mandates that all OrderItem, OpportunityLineItem, QuoteLineItem share the same pricebook as their parent Order, Opportunity, Quote SObjects, resp.

Given it is a requirement for you (though I'd question it) that a given Order can include OrderItems from 2+ year's pricebooks, let's consider how to do this:

Product2    PBE    Pricebook
--------    ---    ---------
  S         $19      2019
  S         $20      2020
  T         $119     2019
  T         $120     2020

The 2020 Order needs to have

  S from 2019 pricebook ($19)
  T from 2020 pricebook ($120)

The business solution to this is simply to use the Pricebook for the current year (2020) and adjust the UnitPrice in the S OrderItem from $20 to $19. That is, if the business wants to discount the price of S to its 2019 value, then discount the price on the order.

Otherwise, you have to create synthetic SKUs in your product catalog like this:

Product2    PBE    Pricebook
--------    ---    ---------
  S         $19      2019
  S         $20      2020
  S-2019    $19      2020
  T         $119     2019
  T         $120     2020      

and have the order be for two SKUs - S-2019 and T, both from Order's Pricebook 2020.

| improve this answer | |

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.