Thursday, November 5, 2015

Compile code at runtime in AX

The following will work if your code is saved in your table as a field and you are compiling the code at run time from the form that uses that field.

void clicked()
{
    XppCompiler xppCompiler = new XppCompiler();
    super();

    YourTable.write();
    if (!xppCompiler.compile(YourTable.displayExpressionAll()))
        error (xppCompiler.errorText());
    else
        info ("@SYS55301");

}

No comments:

Post a Comment