Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / ELandAX blog / Did you know how many decim...

Did you know how many decimals has real type in D365FO by default?

Evaldas Profile Picture Evaldas 1,800
Hello AX World,


Some time ago I have hit a wall. Hard. 

I did not know why my Qty field kept loosing precision. Contract quantity was always 1 and it was partially invoiced many times. Therefore Qty was always a fraction of 1. After digging for a while I found that all my Qty and Amount fields had only 6 decimals.

When you hit a wall, you start looking for who has built the wall in the first place. And I found the answer I was looking for. The information was in What's new or changed in 7.0 (link). Well, that's quite old, I supposed. 



New property Scale was introduced on Real data types and the default was set to 6 (!), due to performance reasons they say.



In AX 2012 the default and fixed number of decimals is 16. When a new Real type field is created it gets the type numeric(32, 16) in the database. While in Dynamics 365 Finance & Operations the field gets the type numeric(32, 6).



The good news is that you can change the scale on newly created types. The bad news is that this property is not extendable and there is no workaround, unless you figure out how to play with only 6 decimals. That means you cannot change the standard Real type number of decimals, like Qty or Amount.

Some time ago I raised this as an issue and I was advised to raise it as an extensibility request (link). I did not raise that as we have decided to workaround the issue differently. 

Be aware and take care!






This was originally posted here.

Comments

*This post is locked for comments