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
SONAL GSONAL G 

Value outside of valid range on numeric field: 1000000000000000000

Hi,
I have one field on Account whoes data type is Number(18,0) . From my one of visualforce page I am creating account record,that time i have added value to field as 999999999999999999.That time I am getting below error,
"value outside of valid range on numeric field: 1000000000000000000".
I have debug the value some how "999999999999999999" value is showing as "1000000000000000000" in apex log. How it is getting converted ?? I am not performing any conversion on it !!
And If i added "999999999999999999" from standard page it is taking same value !!
Can any one help me to find out what will be the reason that is taking "999999999999999999" as "1000000000000000000" from VF ??
NagendraNagendra (Salesforce Developers) 
Hi Sonal,

Make sure the values you are generating are not too "long" -- for example, if you set a Number field to a size of 2, and then try to store 100, you will get this error.If it is Number, I remember that "The sum of the length and decimal places must be an integer less than or equal to 18".

For more information please check with below link from the stack exchange community with a similar discussion and a suggested workaround. Hope this helps.

Kindly mark this as solved if the information was helpful.

Thanks,
Nagendra
mukesh guptamukesh gupta
Hi Sonal,

I have test this issue on my side, you are correct. inputtext is not enter 18 digit 9, Please contect Salesforce support they will resolve this issue,
it's a technical issue.

If you like this, Please Mark As a best Answer!!!!

Regards
Mukesh