Monday, October 10, 2016

Using jumpref method on PurchReqLine on AX 2012 R3

Override method jumpRef ItemId field on Form DataSources

public void jumpRef()
{
    //super();
    PurchReqLine    _purchRLine;
    Args            args;
    MenuFunction    menuFunction;
    Common          rec;
    ;   
    _purchRLine = PurchReqLine;
   
    rec = InventTable::find(_purchRline.ItemId);

    args = new Args();
    args.caller(element);
    args.lookupRecord();
   
    args.record(rec);
    args.caller(element);

    // Create a new MenuFunction that launches the Reasons Menu Item

    menuFunction = new MenuFunction(menuitemdisplaystr(EcoResProductDetailsExtended),MenuItemType::Display);

    menuFunction.run(args);       
}

No comments:

Post a Comment