-
Notifications
You must be signed in to change notification settings - Fork 693
Description
Describe the issue
A regular decimal field in our extension no longer accepts more decimal places than setup in the General Ledger Setup for Amounts. This used to work in previous BC versions, so it's a breaking change.
This is how the field is defined in our extension:

(no decimal places setup and no AutoFormatType)
This is the error we get when we try to enter more positions than the Amount Unit Precision allows in the General Ledger Setup:

When I change the Amount Decimal Places to 2:5 in the General Ledger Setup (and I refresh the session), then the same value is accepted.
Expected behavior
The Decimal Places for Amounts and Unit Amounts should only be applied to decimal fields with a corresponding AutoFormatType.
Steps to reproduce
This issue seems to apply to all our decimal fields in all our extensions.
So, reproduction should be quite straightforward:
- Create a new decimal field in an extension.
This decimal field should not have any properties except a caption and a dataclassification. - Add the decimal field to a page.
Set the ApplicationArea and a Tooltip. - Publish the extension
- Verify that the Amount Decimal Places are set to 2:2 in the General Ledger Setup.
- Enter a decimal with more than 2 decimal places (0.0001).
Additional context
We do have a workaround, but it requires that we explicitly set the decimal places for the decimal fields.
We have seen this behavior in Version: NL Business Central 23.1 (Platform 23.0.13763.0 + Application 23.1.13431.13546)
But also in the latest builds of BC22
There is also something off with the error message as it doesn't give the option to copy the call stack, which is the new behavior in BC23.