How to: Define an Extended Data Type as an Array [AX 2012]
Updated: February 13, 2012
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
You can create an extended data type in the Application Object Tree (AOT) that contains multiple elements. This enables you to store multiple data elements in a single field that is based on this extended data type.
To manage changes to AOT objects, a version control system is available. For more information, see Version Control System.
A typical example is an extended data type for handling an address. Instead of defining three fields on your form to enter the address, you can define an extended data type with three elements (the first element exists by default), as shown in the following figure.
When you create a form based on a table that contains a field of the MyAddress type, MorphX automatically generates a field on your form for each element in the MyAddress definition. The definition of the MyAddress type above causes 3 fields to be generated on a form, called Address, Address1, and Address2.
You can make arrays of all categories of extended data types.
For a description of how to create your own extended data types, see How to: Create an Extended Data Type.
To see a full description of the properties you can modify for each category of extended data type, see Extended Data Type Properties.
Expand the relevant extended data type, and then locate the Array Elements node.
Right-click the Array Elements node, and then choose New Element in the shortcut menu.
Display the property sheet for the element, and then rename the element by changing the Label property.
To specify the plural name of the element, use the CollectionLabel property.
To display a help string when using the extended data type in a form, use the HelpText property.
Save your modifications.
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. get your copy at the MS Press Store