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

Best Practices for Troubleshooting Application Issues in D365 and Power Platform

When facing application issues, it’s important to systematically troubleshoot before reaching out for support.  Follow these steps to ensure...