We have a number typed field say Min_Distance__c
where we have defined, Length=1 and Decimal places=2. But we experienced that salesforce allows to save numbers with more than 2 decimal places.
In pages, it shows the correct rounded values while queries or remote calls give the actual value(all the decimal places). Can someone confirm what is the behavior we should expect?
My thought is even in setup we define the decimal places, that is only for showing in visualforce pages. It saves whatever the decimal points it receives.
Best Answer
Only enforced in the UI (to maintain backward compatability). Apex can store up to 24 decimal places:
http://help.salesforce.com/HTViewSolution?id=000212661