Range on integer fields in Axapta/Dynamics Ax


Is there a way, in Axapta/Dynamics Ax, to create an Extended Data Type of type integer which only allows enering values in a specified range (i.e., if the extended data type is meant for storing years, I should be able to set a range like 1900-2100), or do I have to manage the range using X++ code?

And if I need to use X++ code to manage the range, which is the best way to do it?

Best Solution

I suggest you use the ''validateField'' of the corresponding table. Search for the method in AOT\Data Dictionay\Tables to see many examples.

Related Question