Introduction to Microsoft Dynamics AX 2012 R3 Development-1

Microsoft Dynamics AX 2012 R3 Development-1

Locus IT ServicesMicrosoft Dynamics AX 2012 R3 Development-1

Lesson 4 : Data Types: Primitive and Extended

Data Types:

Microsoft Dynamics AX uses data types to define how data is stored and restricted within the database. There are two data types primitive and extended data types (EDT).

Primitive Data Types

The basic set of primitive data types in Microsoft Dynamics AX map to underlying data types that exist in the physical database. These primitive data types can be expanded to create Extended Data Types, which are reusable data types having a specific definition.

Extended Data Types

EDTs or other EDTs. The benefit of creating EDTs is the reuse of their properties. For example, the label for one EDT can be inherited from the EDT that it extends.

Conversion of Data Types

he automatic and explicit conversions that can be carried out between different data types are listed in the help topics for several of the primitive and composite data types. This topic describes the rules and algorithms that MorphX uses to perform automatic (or implicit) type conversion on primitive data types.

The default values and the internal representation for variables of primitive data types in X++ are shown in the following table.

Data type Default Internal representation
Boolean false Short number
Integer 0 Long number
Real 0.0 BCD (binary-coded digital) number
Date Null Date
String empty List of characters
Enums 0 (first entry) Short number

Null Values for Data Types

Microsoft Dynamics AX does not support the concept of null values that is available in many other Database Management Systems (DBMS). A field in Microsoft Dynamics AX always has a type and a value.

For each data type, however, one value is considered null (for example, when the validateField table method is executed).

Type Value treated as null
Date 1900-01-01
Enum Element with its value set to 0.
Integer 0
Real 0.0
String An empty string
Time 00:00:00

A table field that is created based on an EDT will also inherit properties from that EDT.Another benefit is more efficient maintenance. The properties of many fields can change at one time by changing the properties on the EDT.Most fields in Microsoft Dynamics AX tables are based on EDTs.

Locus IT Project Management Office
What’s it?