Retrive the Indexes from multiple Tables in Aot


i want the indexes rom the all the tables present AOT. Instead of going to database i need to find indexes list in AOT.

Can you please send me the code to retrive the indexes in AOT using MICROSOFT DYNAMICS R3 2012.

Like in sql if we write the query           select * from sys.indexes  ---------         it will give list of indexes.

i need these type of query in AOT.

Can you have any idea on these please send me the Answer.



  • You can utilize Dict* classes to iterate all classes and all indexes inside them.

    It could look like this:

    Dictionary dictionary = new Dictionary();
    SysDictTable dictTable;
    DictIndex dictIndex;
    TableId tableId;
    int indexId;
    tableId = dictionary.tableNext(0);
    while (tableId)
        dictTable = new SysDictTable(tableId);
    	indexId = dictTable.indexNext(0);
    	while (indexId)
    		dictIndex = dictTable.indexObject(indexId);
    		indexId = dictTable.indexNext(indexId);
        tableId = dictionary.tableNext(tableId);