AX / D365FO – String value as tableName in Select Statement

I have a string which stores the bufferTable name, now i want to use this string in a select statement.

I could use this sample code

SysDictTable dictTable = SysDictTable::newName('UserInfo');
Common common = dictTable.makeRecord();
   
while select common
{
    //This expects that the table contains "Name" field
    info(common.(dictTable.fieldName2Id('Name')));
}

One response to “AX / D365FO – String value as tableName in Select Statement”

  1. Seçkin Eldener Avatar
    Seçkin Eldener

    Hello,

    Could you give filter with string?

    Like

Leave a comment