We have the following challenge with currency fields:
Scenario: On child record(s) (in a multi-currency org) we have pricing information which is stored as a currency value with 5 decimal numbers in the database. The user needs to be allowed to enter such fine/small values. On the parent record we want to summarize all of its children's prices into one number. Because it is at a higher level view, we are not interested in 5 decimal places.
Initial Solution: We created Roll-Up Summary fields, which has no Decimal Number setting or possibility to round. So, additionally for "view reasons" in the standard page layout, we created a formula field. This formula has Return Type: CURRENCY and Decimal Places: 0.
Problem: But when we look now at the page layout, we see that still 5 decimal places are returned (We also tried adding ROUND(x,0) and FLOOR(x), it didn't help).
My thought was that maybe it is due to the roll-up from a 5 decimal places currency field, but I tried this and the result was even more strange:
The result:
Can anyone explain what is happening and maybe also how to solve this?
My guess so far was that Salesforce takes compares all existing currency fields on a custom object and select the finest/most detailed decimal places setting and applies it to all other fields. But that calculations are simpler and there is a consistent view for the user (on my object are other currency fields, besides the roll-up summary that I described earlier).
ROUND(rollupField__c, 0)
expression). So from$ 12,25000
i am getting$ 12