12.06.2012, 12:11 | #1 |
Участник
|
ax-erp: X++ Code to get the Ranges / Criteria from Query
Источник: http://microsoft-dynamics-ax-erp.blo...eria-from.html
============== Hi , Following Job illustrates how we can get the criteria / ranges specified by the user in the run-time Query criteria dialog. X++: static void Query_getRanges(Args _args) { Query query = new Query(); QueryRun queryRun; QueryBuildDataSource qbd; CustTable custTable; QueryBuildRange range; int cnt, i; ; qbd = query.addDataSource(tablenum(CustTable)); queryRun = new QueryRun(query); queryRun.prompt(); // To Prompt the dialog cnt = queryRun.query().dataSourceTable(tablenum(CustTable)).rangeCount(); for (i=1 ; i<=cnt; i++) { range = queryRun.query().dataSourceTable(tablenum(CustTable)).range(i); info(strfmt("Range Field %1, Value %2",range.AOTname(),range.value())); } while (queryRun.next()) { custTable = queryRun.get(tablenum(CustTable)); info(strfmt("Customer %1, Name %2",custTable.AccountNum, custTable.Name)); } }
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. Последний раз редактировалось Poleax; 13.06.2012 в 14:08. |
|
|
|