Wednesday, November 30, 2016

Get Table Properties in ax 2012

//Get Table Properties in ax 2012

static void TableProperties(Args _args)
{
    DictTable       dictTable;
    DictField       dictField;
    int             i, cnt;
 
    dictTable = new DictTable(tableNum(CustTrans));
    cnt = dictTable.fieldCnt();
    for (i= 1; i<=cnt;i++)
    {
        dictField = new DictField(tableNum(CustTrans),dictTable.fieldCnt2Id(i));
        if (dictField.mandatory())
        {
            info (strFmt("Field %1 is mandatory.",dictField.label()));
        }
    }
   
}

No comments:

Post a Comment

SQL Query combined report: Data vs Index size

 USE AxDB; GO SELECT TOP (100)     s.name AS SchemaName,     t.name AS TableName,     SUM(CASE         WHEN i.index_id IN (0,1)         THEN...