Axapta 是否可以进行从多个表中获取数据的查找?
在Dynamics Ax中,我可以使用Axapta 是否可以进行从多个表中获取数据的查找?,axapta,dynamics-ax-2009,Axapta,Dynamics Ax 2009,在Dynamics Ax中,我可以使用sysTableLookup显示具有多列网格的组合查找 如何从多个表中获取数据?您可以在查询中连接到其他表,请参见下面的示例 可以在查找中使用显示方法从其他表中提取数据 或者您可以使用此扩展: 此查找仅显示来自CustTable、单个表的字段,而不显示来自多个表的字段。CustTable和CustTrans,我在这里遗漏了什么? public void lookup() { Query query = new Quer
sysTableLookup
显示具有多列网格的组合查找
如何从多个表中获取数据?您可以在查询中连接到其他表,请参见下面的示例
可以在查找中使用显示方法从其他表中提取数据 或者您可以使用此扩展:
此查找仅显示来自CustTable、单个表的字段,而不显示来自多个表的字段。CustTable和CustTrans,我在这里遗漏了什么?
public void lookup()
{
Query query = new Query();
QueryBuildDataSource dsCustTable;
QueryBuildDataSource dsCustTrans;
// Instantiate sysTableLookup object using table which will provide the visible fields
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(CustTable), this);
;
// Create the query. Only select customers where blocked != All and one more more transactions
// exist with no closed date
dsCustTable = query.addDataSource(tableNum(CustTable));
dsCustTable.addRange(fieldNum(CustTable, Blocked)).value(queryNotValue(CustVendorBlocked::All));
dsCustTrans = dsCustTable.addDataSource(tableNum(CustTrans));
dsCustTrans.relations(true);
dsCustTrans.joinMode(JoinMode::ExistsJoin);
dsCustTrans.addRange(fieldNum(CustTrans, Closed)).value(queryValue(dateNull()));
// Set the query to be used by the lookup form
sysTableLookup.parmQuery(query);
// Specify the fields to show in the form. In this case we have chosen
// Account number, name, and dimension one.
sysTableLookup.addLookupfield(fieldNum(CustTable, AccountNum));
sysTableLookup.addLookupfield(fieldId2Ext(fieldNum(CustTable, Dimension), 1));
// Perform the lookup
sysTableLookup.performFormLookup();
}