System-generated find() and exist() methods on tables

 
Good afternoon,
 
The following job will output correct (but not best practice) code for find() and exist() methods for any table (that has a primary key), to a text file:
 
public static void genFindNExist(Args _args)
{
    SysDictTable sysDictTable;
    AsciiIO asciiIO = new AsciiIO(‘C:\\Documents and Settings\\#your user#\\Desktop\\asciio.txt’, ‘a’);
    ;
 
    sysDictTable = new SysDictTable(tablenum(AnyTableName));
    asciiIO.write(sysDictTable.getSourceFind());
    asciiIO.write(sysDictTable.getSourceExist());
}
This entry was posted in Dynamics Ax 4.0x. Bookmark the permalink.