Posts

Showing posts with the label SysTableLookup

Create a custom lookup with multiple data sources on form using X++

Open the form on which you want to create a custom lookup. Go the data source - fields, select field and override the lookup method. Following code will help you in creating custom lookup using SysTableLookup with multiple data sources.  public void lookup(FormControl _formControl, str _filterStr) {      SysTableLookup            sysTableLookup;      Query                          query;      QueryBuildDataSource  qbds1, qbds2;      ;      sysTableLookup = SysTableLookup::newParameters(tablenum(table1),_formcontrol);      query = new Query();      qbds1 = query.addDataSource(tablenum(table1));    ...