Hi,
In lookup where to give condition or where write to write query
act i want to show a lookup from one table but it shows all the record,i want that some specific record should only show
means basing on some condition record should come,so for that where r how to write query
Proxy.SysDataSetBuilder sysdatasetbuilder = Proxy.SysDataSetBuilder.constructLookupDataSet(this.AxSession.AxaptaAdapter, TableMetadata.TableNum(this.AxSession, “InventTable”));
lookup.LookupDataSet = new DataSet(this.AxSession, sysdatasetbuilder.toDataSet());
its shows all the record but i want give certain condition so how to write
plz help
Please check with below code.
Proxy.SysDataSetBuilder sysdatasetbuilder = Proxy.SysDataSetBuilder.constructLookupDataSet(this.AxSession.AxaptaAdapter, TableMetadata.TableNum(this.AxSession, “InventTable”));
lookup.LookupDataSet = new DataSet(this.AxSession, sysdatasetbuilder.toDataSet());
lookup.LookupDataSet.Init();
Proxy.Query query = lookup.LookupDataSet.DataSetViews[0].MasterDataSource.query())
Proxy.QueryBuildDataSource dataSource = query.dataSourceName(“InventTable”))
Proxy.QueryBuildRange range = dataSource.addRange(“Field id to filter”))
range.status = (int)Proxy.RangeStatus.Open;
range.value = Convert.ToString(“value for filter”);
Hope this will help.