Skip to content

How to get list of tables using X++

static void ListOfTables(Args _args)
{
    UtilElements        localEelmet;
    UtilEntryLevel      LayerName = UtilEntryLevel::usr;
    TreeNode            treeNode;
    ;
    while select localEelmet
        where localEelmet.recordType == UtilElementType::Tables
            && localEelmet.utilLevel == LayerName
    {
      treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(localEelmet));
        info(strFmt("Name: %1",localEelmet.name));
    }

}

Published inTechnical Blog