Description:-
Create Table Name it
“A_Student”.
Now run your job by pressing F5 and their you can see fields Information.
In this Example we will see how many field are user define
and how many fields are system define in table. By achieving this functionality
we will check by job in ax 2012.
Let’s Create Table and add some field in table.
- Expand AOT Node.
- Open Data Dictionary Node.
- Select Tables and right Click Select New Table.
- Name it “A_Student”.
- Now open table in Insert Some Data in A_Student table.
Now create job and
code for check how many field are user define and how many fields are system
define in table.
Create Job from AOT
- In the AOT, click Job.
- Right-click the Job node, and then select New Job.
static void SystemClassesFields(Args _args) { SysDictTable dictTable; DictField dictField; Common common; Counter counter; ; dictTable = new SysDictTable(tableNum(A_PO)); for (counter=1; counter<=dictTable.fieldCnt(); counter++) { dictField = new DictField(dictTable.id(), dictTable.fieldCnt2Id(counter)); if (dictField.isSystem()) { info(strfmt("System field: %1", dictField.label())); info(strfmt("System field: %1", dictField.name())); } else info(strfmt("User field: %1", dictField.label())); } if(dictField.isSql()) { info(strfmt("sql field: %1", dictField.label())); } }
Now run your job by pressing F5 and their you can see fields Information.
Thanks for comments.....