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
Edwin KEdwin K 

Set number format in apex class

Hi,

 

I want to ask is it possible to set a format in number data type in apex class? My case is I ahve 1 field with text data type and the example of the field's value is "My budget cost: $ 12,000,000.59" without double quotes.. Are there any possible ways to input a number value with specific format? Any suggestions would be great..

 

Thanks..

Navatar_DbSupNavatar_DbSup

Hi,

    you can set the Number format in apex class through javascript code in visual force code.Use the document.getElementById in javascript to get workaround on this.Use the "parseFloat" to set the number in particular format.