Create a currency formula field with no decimal places for Standard Page Layout

We have the following challenge with currency fields:

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.

This is the formula (OK, it is called Revenue, but it doesn't matter in this example

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).

The Revenue(Lost) is 0, that is ok from a summary point of view. The 5 decimal places are a problem

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:

Entered as return value just a random integer. There is NO obvious relation to any other field.

The result:

Shouldn't be there at least this time no decimal places?!

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).


You can create a text formula for displaying amounts to the users like this:


Source : Link , Question Author : Nisse Knudsen , Answer Author : angry_at_russia

Leave a Comment