Pages

Monday, August 24, 2015

Salesforce: Product in Multi Currencies Setup

In previous blog, we discussed on how to setup multi currencies. You defined the corporate currency, adding a few currencies needed for your new branch office in overseas, configure the exchange rate, make sure each user have correct default currency and option to select currency in the page layout. As admin, you also update pipeline reports with additional converted fields. All looking good and you think ready for deployment.

As the good admin, you have to configure this in a sandbox and get your users to have a UAT sign-off before deploy into Production environment. But, your users found that they cannot add Product if the Opportunity is not in the corporate currency. When they click "Add Product" button, there is no products shown in the Product Selection search page.

What is the issue? 
This is because you need to add the products with all new currencies for all Price Books needed.

This is a 2 steps process. You will need to ensure that you have the currency in Standard Pricebook before adding them into any Custom Pricebook.

1st step is to add in the Standard Pricebook 
Even you not use Standard Pricebook, meaning Standard Pricebook is not Active. You have to add new currencies for the Products in this Pricebook.

But, if you have 100 products and 5 price books, this process will be very tedious if have to set it manually. Fortunately, we can use Data Loader to load them.

Here is the data needed to populate for Standard Pricebook:
Object: PriceBookEntry
Fields:
- CurrencyIsoCode
- Pricebook2Id
- Product2Id
- UnitPrice

If you notice, there is a field called IsActive in PriceBookEntry, but since if we are not using Standard Pricebook, we can skip that field, so when the price book created, it will show as Inactive product for the Standard Pricebook. But, if you are using Standard pricebook, you need to populate IsActive = 1.

While for UnitPrice, it is a mandatory field, even you not use it, you can just populate 1 or 0 for this field.

CurrencyIsoCode is all new currencies added to the system.

Pricebook2Id is the Pricebook Id, this would be standard price book, the Id is start with prefix 01s

Product2Id is the Product Id, this Id is start with prefix 01t

CurrencyIsoCode, Pricebook2Id, and Product2Id must be unique across PriceBookEntry object.

Each successful record inserted to the Pricebook Enrty object will have a record with prefix 01u.


2nd step is to add to Custom Pricebooks (optional)
If you have Custom Pricebook, this would be the 2nd step after you load all the products with the currencies to Standard Pricebook as in step 1 above.

The same thing here, we can use Data Loader to load them, and again we need to load them into the same PriceBookEntry object. You need to load the same data set, except it would be custom Price Book Id and make sure IsActive = 1.
 
Object: PriceBookEntry
Fields:
- CurrencyIsoCode
- Pricebook2Id
- Product2Id
- UnitPrice
- IsActive

What happened if I skip step 1 and directly go to step 2? You will get error "No Standard Price Defined For This Product"


Reference:


No comments:

Post a Comment