0

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?

2

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
1

In Edit Page Layout it will show the decimal position but in actual screen it will not show the decimal position When decimal position is zero.

  • The screenshot on the original question shows an example record in the save mode. Any other ideas? – Katie Holden Mar 10 '15 at 19:52
  • Hi @KatieHolden. For USD the default format is 1,234.56. Here is the salesforce doc (help.salesforce.com/apex/…) about. The next solution will be change the type to Number or Text – Tamil Mar 10 '15 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.