Tuesday, 29 March 2016

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));
}
}

No comments:

Post a Comment