AL icon indicating copy to clipboard operation
AL copied to clipboard

AsDecimal() in TestPage does not work for empty value

Open pschwambornMC opened this issue 3 years ago • 1 comments

1. Describe the bug If i have a field in a testpage with an empty value and i want to convert the value into a decimal value with AsDecimal() function an error occurs "Input string was not in a correct format".

2. To Reproduce write code in a test codeunit with a testpage and a field with an empty value:

ExampleTestPage.Field3.AsDecimal()

3. Expected behavior I would expect that the value "0" as return value. (As in older versions <BC20.3)

4. Actual behavior An error is occurring with message: "Input string was not in a correct format"

5. Versions:

  • AL Language: 9.3.646020
  • Visual Studio Code: 1.69.1
  • Business Central: 20.3.42673.43026

pschwambornMC avatar Jul 18 '22 13:07 pschwambornMC

Hi, could you provide a test page and a test codeunit that makes the error occur? This would help in trying to reproduce the problem. Thanks

sergiudina avatar Aug 03 '22 11:08 sergiudina

This issue has been closed because it needs more information and has not had recent activity. Please open a new issue if you believe this has not been resolved and reference the current issue.

sergiudina avatar Aug 29 '22 09:08 sergiudina