Mansa Blog

How to display different currency format values in Visual Force page?

If your Organization currency is set to any other currency other than USD and you want to display value of currency on a Visual Force Page or PDF, then use <apex:outputField value=”{<Currency Field>}” /> instead of <apex:outputText >.


For example, there is a custom field on Contact ‘Price__c’ and its value is 1.400,00 (German Euro format) on Contact record detail page. So, the difference in the output would be:


<apex: outputText value=”{Contact.Price__c} “></apex:outputText>

Output: 1,400.00

<apex: outputField value=”{Contact.Price__c} “></apex:outputField>

Output: 1.400,00


The difference lies because <apex:outputText> displays the value as it is stored in the Salesforce database but <apex: outputField> displays the value as it is on the detail Page of the record.

Share/Save/Bookmark

Comments are closed.