web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

QueryBuildDynaLink Class

Pooja Karki Profile Picture Pooja Karki 3,045

Today I will demonstrate you that how to use QueryBuildDynaLink Class in AX.


static void querybuilddynalink_example(Args _args) 
{
Query query = new Query();
QueryBuildDataSource custTableQBDS;
QueryBuildDynalink qbdl;
QueryRun qr;
CustTable custTable;
CustTrans custTrans;
custTableQBDS = query.addDataSource(tablenum(custTable));
select firstonly custTrans where custtrans.Voucher == 'SIV-100015';
custTableQBDS.addDynalink(fieldNum(CustTable, AccountNum), custTrans, fieldNum(custTrans,AccountNum));
qr = new QueryRun(query);
while (qr.next())
{
custTable = qr.get(tableNum(CustTable));
setPrefix( 'Customer – ' + custTable.AccountNum);
info(custTable.CustGroup);
info(custTrans.Voucher);
}
}

This was originally posted here.

Comments

*This post is locked for comments