function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jaime StuardoJaime Stuardo 

how to add products to a pricebook with different currency

Hello,

I am sending to Salesforce an opportunity that has products in USD currency, however, PriceBook has defined somewhere the currency as CLP.

When saving the opportunity using WSDL, I got this error:
 
<fields>PricebookEntryId</fields><message>field integrity exception: PricebookEntryId (pricebook entry currency code does not match opportunity currency code)</message><statusCode>FIELD_INTEGRITY_EXCEPTION</statusCode></errors>
I was reading about Pricebooks and I have read that a pricebook can contain any currency. How can I configure it to accept multicurrencies? I didn't find any information about this,.

Thanks
Jaime
Raj VakatiRaj Vakati
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.


PricebookEntry must have matching Currencies(That is an Opportunity line item must lookup a Product, using PriceBook, all in the Same Currency as the original Opportunity.)

 when you try to change the Opportunity Currency, at that point in time it will no longer match the Currency of the PricebookEntry and so would fail to match the criteria.


https://salesforce.stackexchange.com/questions/85372/pricebook-entry-currency-code-does-not-match-opportunity-currency-code/85378
Deepali KulshresthaDeepali Kulshrestha
Hi Jaime,

Greetings to you!

By giving CurrencyIsoCode differently you can add products to a Pricebook with a different currency.
Here is the data needed to populate for Standard Pricebook:
Object: PriceBookEntry
Fields:
- CurrencyIsoCode
- Pricebook2Id
- Product2Id
- UnitPrice

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
Jaime StuardoJaime Stuardo
Hello, when setting USD as the currency for the line item, after setting the PriceBookEntry currency to USD I get this error:

"Unable to create/update fields: CurrencyIsoCode. Please check the security settings of this field and verify that it is read/write for your profile or permission set."

What else do I need to check?

Thanks
Jaime