How to get field type in dynamics ax 2012 using x++

 display FieldType fieldType()
{
    FieldType       ret;
    DictField       dictField;
    TableId         tableId     = tableNum(PurchLine);
    FieldId         fieldId     = fieldName2id(tableId,"Field Name");
    if(tableId && fieldId)
    {
        dictField   = new DictField(tableId,fieldId);
        ret            = dictField.baseType();
    }
    return ret;
}

Comments

Popular posts from this blog

How to read from csv file in Dynamics AX 2012 Through X++

How to loop through enum in dynamics ax 2012 using x++

How to get field label in dynamics ax 2012 using x++