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)
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
Buy Me a CoffeeNo comments. Be the first one to comment on this post.
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 "buy me a coffee" link.
Join us.