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

Customer inbound custom service in D365 F&O with X++

  [DataContractAttribute] class GOD_CustomerCreateContract {     str                 accountNum;     // Optional; if blank, a number sequenc...