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;
}
}
}
}
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:
Post a Comment