fieldName2Id Function [AX 2012]

Updated: December 10, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Retrieves the field ID of the table field that is specified by a table ID number and a field ID number.


int fieldName2Id(int tableid, str fieldname)

Parameter

Description

tableid

The ID number of the table.

NoteNote
Use the tableName2Id function to specify the ID of a table.

fieldname

The name of the field.

The ID of the field that is specified by the tableid and fieldname parameters.

static void fieldName2IdExample(Args _arg)
{
    int id;
    ;
    id = fieldName2Id(tableName2Id("Address"), "Name");
    // Returns 6. Name is the 6th field in the Address table.
    print id;
    pause;
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: