Tuesday, 9 December 2014

Finding Table mandatory fields in AX 2012

static void MandatoryFields(Args _args)
{
    SysDictTable       dTable;
    SysDictField       dField;
    Counter         counter;
    ;
    dTable = new SysDictTable(tablenum(CustTable));
    for(counter =1; counter<= dTable.fieldCnt();counter++)
    {
        dField = new SysDictField(dTable.id(),dTable.fieldCnt2Id(counter));
        if(dField.mandatory())
        info(dField.name());
    }
}

No comments:

Post a Comment

Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO

There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...