5 Apr 2013

DictTable and DictField Class

Take a look below on DictTable and DictField class in AX.

DictTable class is used to access information ralated to table.

DictField class is used to access information ralated to table fields.

Example

static void dictTable_Ex(Args _args)
{
DictTable dictTable;
DictField dictField;
TableId tableId;
FieldId fieldId;
;

tableId = tablenum(CustTable);
dictTable = new DictTable(tableId);

if(dictTable)
{
fieldId = dictTable.primaryKeyField();

if(0 != fieldId)
{
dictField = new DictField(tableId, fieldId);
if(dictField)
{
print strfmt("Primary key field name: %1", dictField.name());
pause;
}
}

}
}

No comments:

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...