I have a Managed field Number(16, 2) of which number of decimal places cannot be edited.
For Example, if I enter 1.2391276549 into that field, It is displayed as 1.24 (as we know that salesforce internally saves all the decimal places and rounds it while displaying).
Question:
Is there a way to get full number with all the decimal places (1.2391276549 instead of 1.24) via APEX and Formula?
Best Answer
Apex and API methods can actually save records with decimal places. This is true for standard and custom fields. Salesforce changes the display to match the definition, but they are stored in the database as inserted.
When the user sets the precision in custom fields in the Salesforce application, it displays the precision set by the user, even if the user enters a more precise value than defined for those fields. However, when you set the precision in custom fields using the API, no rounding occurs when the user retrieves the number field.
This is completely working as designed and Salesforce kept the behavior so that it can be backward compatible.
Reference:- Data type number field does not store more numbers in decimal places than defined
Also, Introducing SOAP API