09-11-2024 12:14 PM
usually, we have a specific Pricebook in SFDC to link up to an order and each pricebook only has 1 Currency,
but on occasion there are multiple price books in Epicor so in SFDC I would use the Standard price book and when I create the opportunity I would set the Currency as USD or Euro etc.
normally this works fine but randomly like once a few months ago and then twice in 2 days I would get errors like this:
but today I had an order in Epicor with 3 SKUs and 2 worked and 1 didn't on the same Op
so i started looking at this formula since its calculation a discount and thought maybe its a simple rounding issue
originally it was just a simple Price * (1- Discount)/100 which shows the price per unit
"OrderDtl_DocUnitPrice"]}')* (1- "OrderDtl_DiscountPercent"]}')/100))
so thinking it as a rounding issue I added
).round(2)
then attempted to add currency conversion to the rounded formla
.to_currency
and the error message changes to:
its weird because it works fine 99.9999% of the time as it originally was.
Was thinking it would be as simple as just hard coding the currency when i add the SKU but that's not possible at the Opportunity Product level unless I loop through to find the pricebookentry ID which would eat up tasks if I had to do it for all SKUs using standard pricebook
any ideas???
10-07-2024 01:59 AM
Hi @johnw ,
The steps to reproduce is a bit confusing. It would be better to identify what values are causing the formula to error. You can check the input tab on the job report to see what value of the data pill the formula is using that causes an error. Based on your sample formula, you must check the values of "OrderDtl_DocUnitPrice" and "OrderDtl_DiscountPercent". It is possible that one of the value from the data pills used is blank or is not a valid format.
10-22-2024 07:51 AM
not sure if the whole DocUnitprice is a red herring since now I'm seeing a version 3 error message as shown below
10-17-2024 08:46 AM
so weird this used to be super random but now its happening a lot.
its only if the Standard pricebook is being used and Standard pricebook is only pricebook that can be USD, CDN or EURO so its almost like when adding the SKU its not sure which currency or its grabbing the first currency and doesn't match the Opportunity Currency. But adding teh opportunity Line item i don't have any way to force it to USD for example
very strange how this has been running fine for a while
10-22-2024 07:08 AM
At the opportunity level I enter the Price Book and the Currency
At the Opportunity Product object I have always just included the Product ID and its worked
The ONLY pricebook that has more than 1 currency is the Standard pricebook
As discussed here recently it randomly stopped working for SOME where I would get an error message when trying to add the Opportunity Product records to a new Opportunity
Again this has been working fine for quite a while and just started doing this
But today I noticed this message what is version 3.0 and when did something change???:
It almost feels like its go9ng to force me to go search on every SKU now to find the exact pricebook entry ID for my pricebook and currency combination. This doesn’t seem like progress since this was working fine.