Create and add datasource with range in X++ // Code using X++ to build the query Query query; QueryRun queryRun; QueryBuildDataSource qbds; ProjTable ProjTable; ; query = new Query(); // Add a datasource to the query qbds = query.addDataSource(tableNum(ProjTable)); // Add a range to the newly added datasource. qbds.addRange(fieldNum(ProjTable, ProjId)).value( "00403_1036..00412_1036" ); queryRun = new QueryRun(query); while(queryRun.next()) { projTable = queryRun.get(tableNum(ProjTable)); info(projTable.ProjId + ", " + ProjTable.Name); } Use query object to retrieve AOT query // Code using a query string static void UseAOTQuery(Args _args) { Query query; QueryRun queryRun; QueryBuildDataSource qbds; QueryBuildRange qbr; ProjTable p rojTable ; qu...
A library with Microsoft Dynamics AX, Microsoft Dynamics 365 FinOps and Supply Chain Management, Power Platform, Integrations, development and functional processes, tricks and trip, tutorials and much more....