29 June 2018

Working with Queries 2 in AX 2012 and Dynamics 365

public Query queryBuild()
{
Query q;
QueryRun qr;
QueryBuildDataSource qbd,qbd1;

q = new Query();

qbd = q.addDataSource(TableNum(CustTable));
qbd1 = qbd.addDataSource(TableNum(CustTrans));
qbd1.addLink(fieldNum(CustTable, CustAccount), fieldNum(CustTrans, CustAccount));

return q;
}

public Query queryBuildHeader()
{
Query q;
QueryRun qr;
QueryBuildDataSource qbd,qbd1;

q = new Query();

qbd = q.addDataSource(TableNum(CustTable));

return q;
}

==
Query q = this.queryBuildHeader();

No comments:

Post a Comment

Give me the commetns and solutions

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.