You need to sign in to do that
Don't have an account?
Rony57
Visual force Error-System.TypeException: Invalid decimal
Hello All,
I have written code in apex and visualforce to saving the Geo location in my detail page. While doing this an error is coming on this particular line.It throw an error on my particular this code:
I have written code in apex and visualforce to saving the Geo location in my detail page. While doing this an error is coming on this particular line.It throw an error on my particular this code:
newSupply.GeoLocation__Latitude__s=decimal.valueOf(latitude); newSupply.GeoLocation__Longitude__s=decimal.valueOf(longitude);
A common problem would be leading white space, try using trim()..try this and let me know if this not solves your issue..
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
In the action {!saveProperty} i have written a code so that after save the property it should render into next page .
its haiving the decimal error same.
Please check null value of lattitue, In case any null value is passing to the Decimal.valueOf function will throw you the TypeException .
My problem came from trying to read from excel file. The last line would always give an error whether it was a decimal, integer, or date. I did not test with string but what I did was add an additional column to the excel file and it worked fine. Has something to do with how apex is parsing the end of line.