[SalesForce] How to remove the Decimal from a Currency Field

I want to get my custom currency field to show no decimal places, but when I update the decimal number in the customization page to zero, the field still shows 2 decimal places for the currency field on the page layout.

I have updated the decimal # to 0

However it is still showing 2 decimals

How can I fix this?

Best Answer

I would surmise you are using Advanced Multi-Currency in your org

There are two parts in play here

  • The decimal precision of the field itself (in your case 0) - this controls rounding done by SFDC when the currency is entered by the UI. See here for more details
  • The precision for display of the currency in the Setup | Company |Manage Currencies - most likely 2 for USD in your org

If you really want to eliminate the display of the trailing decimals for this specific field you have some options

  • Use a field of type Number and display the currency code separately. If this is an Opportunity, Quote, or Forecast, you will lose the advantages of dated exchange rates though
  • Convert your page to a VF page with apex:detail and then use jQuery to suppress the trailing zeroes. Inline edit preserved
  • Convert your page to a VF page and use a custom component for each currency outputField that suppresses trailing decimals based on some attribute passed tot he component. You will lose inline edit for the currency fields however