int k, relLines;
dictField = _orgDictTable.fieldObject(dictRelation.lineExternTableValue(1));
k = 1; relLines= dictRelation.lines(); do { dictField = _orgDictTable.fieldObject(dictRelation.lineExternTableValue(k)); k++; } while (!dictField && k <= dictRelation.lines());You can test result using following job:
static void testSysQueryBuilder(Args _args) { Query q = new Query(queryStr(SalesTableSelect)); QueryRun qr; SalesTable salesTable; QueryBuildDataSource qbds; qr = new QueryRun(q); qr.prompt(); qbds = qr.query().dataSourceTable(tableNum(SalesTable)); while (qr.next()) { salesTable = qr.get(tableNum(SalesTable)); } }Problematic relation is for example with table PrintMgmtDocInstance (Print management document instance)
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units and "buy me a coffee" link.
Join us.