Friday, 25 November 2016

Args Lookup methods in AX 2012 using X++ code



Args Lookup methods in AX 2012 using X++ code


public void lookup()
{
    Args     args;
    Object  formRun;
    ;
    super();
    args = new Args();
    args.caller(this);
    args.name(formStr(VendTableLookup));//VendTableLookup is a form calling for lookup purpose
    args.lookupField(fieldNum(VendTable, AccountNum));
    args.lookupValue( "");// here you can pass the value

    formRun = classfactory.formRunClass(args);
    formRun.init();
    this.performFormLookup(formRun);
}

or

public void lookup()
{
    super();
    VendTable::lookupVendTable(this);
}

No comments:

Post a Comment