Monday, September 25, 2023

Find all the tables in Ax that have no indexes

SQLDictionary   dict;
    DictTable       dictTable;

    ;
    while select dict
    where dict.fieldId == 0 // only tablenames
    {
        dictTable = new DictTable(dict.tabId);
        if ( dictTable.indexCnt() == 0 && ! dictTable.isView() )
        {
            info(strfmt("Table %1 has no indexes", dictTable.name()));
        }
    }

No comments:

Post a Comment

Table browser URL in D365FO

Critical Thinking icon icon by Icons8