ERP Software Logo

Microsoft Dynamics vendors provide comparisons and opinions to professionals in the ERP/Accounting software selection process

 
 

Tridea Partners - A Columbus Company

What table is that?


    Email | Print

    How to determine what table is being referenced in Microsoft Dynamics AX

    With the normalization of data in Microsoft Dynamics AX, many times you need to know what Table is being referenced. There might just be a Table ID in a record and you have no idea what that ID is referencing. On the other hand, you might have a Table Name, and need to know its ID.

     

    Here is a short routine that will accept either a Table ID or Name and will return its ID and Name for you.

     

    void showTable(str  _tableId)

    {

    ;

    if (isInteger(_tableId))

    {

    info (strFmt("%1 %2"

    , _tableId

    , tableId2Name(str2int(_tableId))

    ));

    }

    else

    {

    info (strFmt("%1 %2"

    , tableName2Id(_tableId)

    , _tableId

    ));

    }

    }

     

    showTable("1425");

    showTable("656");

    showTable("CustTable");

    showTable("LedgerJournalTable");

    showTable("MarkUpTrans");

    showTable("PurchTable");

    showTable("345");

    showTable("340");

    showTable("PurchLine");

    showTable("SysLastValue");

     

    Running the routine will give these results:

    1425 VendInvoiceInfoTable

    656 DimensionFinancialTag

    77 CustTable

    211 LedgerJournalTable

    230 MarkUpTrans

    345 PurchTable

    345 PurchTable

    340 PurchLine

    340 PurchLine

    65528 SysLastValue

     

    This article was written by Dave Munn, consultant at Tridea Partners. Tridea Partners is a leading Microsoft Dynamics partner.

    One Response to “What table is that?”

    1. Gary says:

      Can you run your routine interactively in the AOT to find names/IDs. If so how? Thx

    Ask This Expert a Question / Leave a Comment

     

     
     
    Show Buttons
    Hide Buttons