AL icon indicating copy to clipboard operation
AL copied to clipboard

Auto formatted decimal fields still limited to 2 decimal places (build 20258)

Open MikeGlue opened this issue 8 years ago • 5 comments

I'm using build 20258 and there are still some fields that are limited to 2 decimal places. Seems to be that fields where I specifically use the DecimalPlaces property are ok, but fields where I just use the AutoFormatType are still an issue.

See below: image

The Quantity field is ok, but the Unit Cost field still is limited to 2 decimal places. Field definitions are below:

image

image

MikeGlue avatar Jan 23 '18 14:01 MikeGlue

We are looking into it.

StanislawStempin avatar Jan 31 '18 10:01 StanislawStempin

Hi @MikeGlue . Are you sure you are expecting the right behaviour? https://msdn.microsoft.com/en-us/library/dd338607.aspx The AutoFormatType is intended to be accompanied with the AutoFormatExpression property. The AutoFormatType property specifies the type of the formatting (values 0,1 or 2) and then the AutoFormatExpression should provide the formatting string.

Are you saying you expect specifying "2" for AutoFormatType should empose 2 decimal places? Usually if you think there is a bug with v2, it's good to check with CSIDE that it does as you would expect

doivosevic avatar Feb 01 '18 09:02 doivosevic

Yes I am aware of the behaviour of these fields. This is code that was working in my v1 extension and stopped working when converted to v2. I'm using AutoFormatType = 2 with an empty AutoFormatExpr, as per the documentation below.

image

In C/Side you can see a working example of this if you look at the Unit Cost (LCY) field in the Sales Line table.

MikeGlue avatar Feb 01 '18 14:02 MikeGlue

Thank you for clearing this up for me. I've found the missing piece and I'll be working on getting it in.

doivosevic avatar Feb 01 '18 16:02 doivosevic

Thanks to SirBete and sgiordy to request for back port to NAV 2018. This will be included as VSIX enhancement in NAV 2018 CU 6 (June 2018).

dtacconi avatar May 11 '18 10:05 dtacconi