How to execute the method on IL in AX

/// <summary>

///    Initializes the <c>PurchTable</c> record from a <c>VendTable</c> record.

/// </summary>

/// <param name="_vendTable">

///    The vendor record from which to initialize; optional.

/// </param>

server public void  initFromVendTable(VendTable _vendTable = this.vendTable_OrderAccount())

{

    container               purchTableContainer;

    XppILExecutePermission  xppILExecutePermission;


    // Transition to IL to update the sales quantity

    xppILExecutePermission = new XppILExecutePermission();

    xppILExecutePermission.assert();


    purchTableContainer = runTableMethodIL(

                              tableStr(PurchTable),

                              tableStaticMethodStr(PurchTable, initFromVendTableIL),

                              [buf2Con(this, true), buf2Con(_vendTable, true)]);


    CodeAccessPermission::revertAssert();
    this.con2buf(purchTableContainer);
}


private static server container initFromVendTableIL(container _inputContract)
{
............
}
For more reading visit this link

Comments