28 September 2010

Using DictTable

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

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.