How to lookup list of methods (return type) in specific table in Microsoft Dynamics Ax 2012

    DictTable                       dictTable;
    DictMethod                  dictMethod;
    DisplayFunctionType     displayFunctionType;
    DictType                dictType;
    int                     methodCount;
    int                     iCount;
    
    dictTable           = new DictTable(tableNum(AssetTable));
    methodCount         = dictTable.objectMethodCnt();
    setPrefix(strFmt("Table name: %1", dictTable.name()));
    
    for (iCount = 1; iCount <= methodCount; iCount++)
    {
        dictMethod          = dictTable.objectMethodObject(iCount);
        displayFunctionType = dictMethod.displayType();
        if (displayFunctionType == DisplayFunctionType::Get)
        {
            dictType = new DictType(dictMethod.returnId());
            info(strFmt("Method name: %1 , Type : %2 ,Label: %3", dictMethod.name(),dictType.baseType(), dictType.label()));
        }
    }


Comments

Popular posts from this blog

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

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

How to Create Transfer Journal in Dynamics AX 2012 Through X++