For debugging purposes code that can inspect the values of the fields in a datasource in a form or a report can be quite handy. This is how it can be done in e.g. the active method of the datasource : QueryBuildDataSource qbds; QueryBuildRange qbr; int dsc,dsi,rc,ri; // Get the number of datasource on the query dsc = queryRun.query().dataSourceCount(); // Loop over datasources for (dsi=1;dsi { qbds = queryRun.query().dataSourceNo(dsi); info("Table: "+tableid2name(qbds.table())); rc = qbds.rangeCount(); // Loop over fields for (ri=1;ri { qbr = qbds.range(ri); info(fieldid2name(qbds.table(),qbr.field())+" value: "+qbr.value()); } }
My thoughts on Dynamics AX application development. I have been working as a consultant with Microsoft ERP-technology since 1994. Currently I work at Optimate A/S. My main focus is customization and application development. This blog is merely my place to put stuff that I want to remember. If anybody can benefit from reading this, that's great :0). Feel free to use any code snippets posted - but accept that you do this at your own risk!!!