//queryRun.changed in ax 2012
Example :
1) CustTable
2) SalesTable
Query query;
QueryBuildDataSource datasource;
QueryRun queryRun;
int i= 0,
;
query = new Query();
datasource = query.addDataSource(tableNum(CustTable));
datasource = datasource.addDataSource(tableNum(SalesTable));
datasource.joinMode(JoinMode::OuterJoin);
datasource.relations(true);
datasource.addLink(fieldNum(CustTable, AccountNum),fieldNum(SalesTable, CustAccount));
queryRun = new QueryRun(query);
while (queryRun.next())
{
if (queryRun.changed(tableNum(CustTable)))
i++;
}
queryRun.changed(tableNum(CustTable));
//Above line return only when Customer table selecting next record
Example :
1) CustTable
2) SalesTable
Query query;
QueryBuildDataSource datasource;
QueryRun queryRun;
int i= 0,
;
query = new Query();
datasource = query.addDataSource(tableNum(CustTable));
datasource = datasource.addDataSource(tableNum(SalesTable));
datasource.joinMode(JoinMode::OuterJoin);
datasource.relations(true);
datasource.addLink(fieldNum(CustTable, AccountNum),fieldNum(SalesTable, CustAccount));
queryRun = new QueryRun(query);
while (queryRun.next())
{
if (queryRun.changed(tableNum(CustTable)))
i++;
}
queryRun.changed(tableNum(CustTable));
//Above line return only when Customer table selecting next record
No comments:
Post a Comment