A Simple use of X++ query job 2012

Here I am using a query to show all the Customer account number from CustTable.
static void Job31(Args _args)
{
Query                                          query;
QueryRun                                    qr;
CustTable                                    custtable;
AccountNum                                accountNum;
QueryBuildDataSource                qbds;
;
query = new query();
qbds = query.addDataSource(tablenum(CustTable));
qr = new QueryRun(query);
while(qr.next())
{
custtable = qr.get(tablenum(CustTable));
info(strfmt(“%1”, custtable.AccountNum));
}
}

Comments

Popular posts from this blog

Create record in inventdim table through code X++ in ax 2012

Code to import Employee Master data in ax 2012 R3 x++

Post product receipt for registered quantity x++, Ax 2012