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
Kimberly DaleKimberly Dale 

WHOLE NUMBER

Probably easy one.  I have a managed number field (used in calculation for term of renewal)  On my doument I need the display to be 01 instead of 1 and 02 instead of 2 so on up to the number 9,  I was just going to create a text field that says IF (Renewal_Term__c) = 1 then change it to 01 etc.
NagendraNagendra (Salesforce Developers) 
Hi Dale,

This can be achieved using JavaScript.

Assuming that You're asking for zero padding? Not really rounding. You'll have to convert it to a string since numbers don't make sense with leading zeros. Something like this...
function pad(num, size) {
 var s = num+""; 
while (s.length < size) s = "0" + s; 
return s; 
}
Or if you know you'd never be using more than X number of zeros this might be better. This assumes you'd never want more than 10 digits.
function pad(num, size) {
 var s = "000000000" + num; 
return s.substr(s.length-size); 
}
If you care about negative numbers you'll have to strip the "-" and re-add it.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra