function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shailesh DeshpandeShailesh Deshpande 

Formtting a number field.

I have a number field with length as 4 on Campaign object. Now when a user enters a value as 1000, it is automatically formatted as 1,000. I do not want it to get formatted. I simply want to show it as 1000 instead of 1,000. Is it possible to avoid his formatting. I dont want to write a class/trigger to do so.

hitzhitz

Shailesh 

 

Use below code 

 

 

 <apex:outputText value="{0,number,###,###,###}">
             <apex:param name="Due Date" value="{!Account.amount}"/>
  </apex:outputText>
Shailesh DeshpandeShailesh Deshpande

Thanks hitz...but this for this i will need to write a visualforce page....What i want to achieve is in the detail page of Campaign...

Pradeep_NavatarPradeep_Navatar

In my opinion you should use 'Text' data type instead of  'Number' to avoid the formatting.