Tuesday, June 7, 2011

Using Args for Output and Display Menuitems - AX 2009

public static void main(Args args)
{
    VendPurchOrderJour      vendPurchOrderJour;
    PurchTable              purchTable;
    ;
    if(args.dataset() == tablenum(VendPurchOrderJour))
    {
        vendPurchOrderJour = args.record();
        select purchTable where purchTable.PurchId == vendPurchOrderJour.PurchId;
        if(purchTable.CustomsImportOrder_IN == noYes::Yes)
            new MenuFunction(menuitemoutputstr(TestPurch), MenuItemType::Output).run(args);
        else
            new MenuFunction(menuitemoutputstr(TestS), MenuItemType::Output).run(args);
    }
}

No comments:

Post a Comment

Thank you for your thoughts. Your comment will appear in my blog shortly after review.

Have a great day!