Extended Field IDs
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Extended field IDs are used to refer to a particular field within a field array. An extended field ID's array index is packed in the high word, and the actual field ID is packed in the low word as shown in the following figure.
Storage of an array index and field ID in an extended field ID
The following methods are available in the Global Class to manipulate extended field IDs:
fieldExt2Id – Converts an extended field ID to an ordinary ID.
fieldId2Ext – Converts an ordinary field ID to an extended ID.
fieldExt2Idx – Returns the array index of an extended field ID.
Non-array fields also have an array index and are treated as an array field that contains only one element, meaning that their array index is 1. This index can hold the value 0 or 1. The same field can have two different field IDs, one being 1<<16 bigger than the other. These two IDs can be used interchangeably, and the system processes them as if they were identical.
It is best practice to use the fieldExt2Id method to remove the array index part of a field ID, if it is not needed.
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.