21 Kasım 2013 Perşembe

AXAP - Cross company lookup

public void lookup(FormControl _formControl, str _filterStr)
{

      CustTable   custTable;    
      Query                   Query  = new Query();
      QueryBuildDataSource    qbds;
      SysTableLookup          SysTableLookup  =      
            SysTableLookup::newParameters(TableNum(CustTable), _formControl);
    ;
    super(_formcontrol,_filterstr);

    Query.allowCrossCompany(true);      
    Query.addCompanyRange(myTable.Company);
    qbds           = Query.addDataSource(TableNum(CustTable));
    SysTableLookup.addLookupfield(FieldNum(CustTable, AccountNum), true);      

    SysTableLookup.addLookupfield(FieldNum(CustTable, Name));
    SysTableLookup.parmQuery(Query)

    SysTableLookup.performFormLookup();
}


Don't forget to supress control's validate method!..

Hiç yorum yok:

Yorum Gönder