DEV QueryBrowser
From Axaptapedia
DEV_QueryBrowser
Often when we work with queries we need to see the result of the query. To do this usually we use QueryRun class:
QueryRun qr; qr = new QueryRun(query); while(qr.next()) { }
To see necessary fields developer need to descriebe every field inside while loop. Like this:
QueryRun qr; MyTable myTable; AnotherMyTable anotherMyTable; ; qr = new QueryRun(query); while(qr.next()) { myTable = qr.get(tableNum(MyTable)); anotherMyTable = qr.get(tableNum(AnotherMyTable)); info(strFmt('%1 %2', myTable.Field1, anotherMyTable.Field2)); // and so on... }
And how about analysing a dozen and more fields? To get rid this routine was developed QueryBrowser.
[edit] Features
- QueryBrowser allows browse queries from AOT or custom queries as such as TableBrowser works.
For browsing query use construction:
new DEV_QueryBrowser().run( _query );
where _query - browsing query. e.g. :
new DEV_QueryBrowser().run( new Query(queryStr(InventSum)) );
- The tool is integrated with AOT. To browse query from AOT just click Add-Ins\Browse Query.
- Ability to watch on XML structure of query.
- QueryBrowser capable with Tabax.
[edit] Restrictions
QueryBrowser correctly displays queries with linear structure. Queries with tree-type structure will be correctly displayed in case when every data source in query has FetchMode 1:1 only.
[edit] Feedback
If you have suggestions or questions, you may find me at Dynamics AX tips & tricks
