0

I have an opportunity that has 3 products and each product has a list price of $600 and sales price (UnitPrice) of $400. The amount field on the opportunity is showing $1,199.99 instead of $1200 as we'd like.

I ran a query in the developer console against the OpportunityLineItem table for this opportunity record and the UnitPrice is showing $399.996 for each line item.

How can this be and why is it not showing $400. I did some googling and saw there is some feature about "More decimals on price", but this doesn't seem to be relevant here.

We are using a single currency in our salesforce org and "UnitPrice" is a standard salesforce field. Looking at it, it shows (16,2) for the scale/precision

How can I fix this issue so our UnitPrice for each product shows $400 instead of $399.996?

enter image description here

enter image description here

7
  • Have you tried updating the UnitPrice field to explicitly set it to 400?
    – Adrian Larson
    Jan 8, 2022 at 21:51
  • It is already showing $400.00 when I go edit the Opportunity Product record @AdrianLarson Jan 8, 2022 at 21:58
  • Updating it to set 400 as the value might still help. Maybe toggle it to 401 and then back to 400.
    – Adrian Larson
    Jan 8, 2022 at 22:01
  • Yes, I tried it and the record modified stamp did update, but the query results still show $399.996 as shown in my screenshot. Jan 8, 2022 at 22:08
  • 1
    Seems like a floating point error somewhere. You were using standard UI?
    – Adrian Larson
    Jan 8, 2022 at 23:30

0

You must log in to answer this question.

Browse other questions tagged .