Showing posts with label Methods. Show all posts
Showing posts with label Methods. Show all posts

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);
    }
}

Monday, February 28, 2011

Table methods using ValidateWrite() ValidateDelete() initValue() ModifiedField() - Microsoft Dynamics AX 2009

Table methods using ValidateWrite() ValidateDelete() initValue() ModifiedField()

initValue()This method file while creating new record to initialize a value, here I am assigning user id to the userID field.

public void initValue()
{
super();
this.UserId = curuserid();
}