27 May 2011

DictTable and DictField

static void SystemClassesFields(Args _args)
{
SysDictTable dictTable;
DictField dictField;
Common common;
Counter counter;

;

dictTable = new SysDictTable(tableNum(CustTable));

for (counter=1; counter<=dictTable.fieldCnt(); counter++)
{
dictField = new DictField(dictTable.id(), dictTable.fieldCnt2Id(counter));

if (dictField.isSystem())
{

info(strfmt("System field: %1", dictField.label()));
info(strfmt("System field: %1", dictField.name()));
}
else
info(strfmt("User field: %1", dictField.label()));
}
}

1 comment:

  1. Hi..thanks for the post. But how do we find if the field a primary field ?

    ReplyDelete

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.