If you have a currency or number field where the field length is set to 16 or more characters to the left or right of the decimal point with 2 decimal places, the decimal value rounds in unexpected ways. This rounding can also happen in a number field with no decimals where the numeric value is longer than 15 digits.
For example:
1,222,333,444,555,666.88 becomes 1,222,333,444,555,667
1,222,333,444,555,666.84 becomes 1,222,333,444,555,666.80
1,222,333,444,555,666.56 becomes 1,222,333,444,555,666.50
1,222,333,444,555,666.35 becomes 1,222,333,444,555,666.20
1,222,333,444,555,666.12 becomes 1,222,333,444,555,666
49.9999999999999972 becomes 50
9999999999999999 becomes 10000000000000000
This behavior is due to how JavaScript handles numbers and isn’t something Salesforce can control.
If you specify lengthy currency strings via the API, some users interacting with these fields through the UI can experience the JavaScript rounding behavior. If a user saves such a record through the UI, they introduce the rounded value to the database. If any Salesforce validations require that the database value be unchanged, this rounding is seen as a change and triggers the validation.
This behavior is expected, and occurs via the UI in Lightning Experience and via the API using REST API or Bulk API. This same rounding can be seen in the Developer Console when entering a value in a number field.
See Data type number field can store more decimal places than defined.
000394530

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.