Wednesday, 18 May 2016

Lookup in Ax 2012

Override Lookup() Method and Copy the below Code

public void lookup()
{
    Query query = new Query();
    QueryBuildDataSource         qbds;
    QueryBuildRange                 queryBuildRange;
    SysTableLookup                   sysTableLookup;
    super();

    sysTableLookup         =  sysTableLookup::newParameters(tableNum(Dipl_EmployeeMaster), this);
    sysTableLookup.addLookupfield(fieldnum(Dipl_EmployeeMaster, Name), true);
    qbds   = query.addDataSource(tablenum(Dipl_EmployeeMaster));
    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();

}

No comments:

Post a Comment