Axaptapedia is now maintained by AgileCadence For more information please click here.

DEV QueryBrowser

From Axaptapedia
Jump to: navigation, search

DEV_QueryBrowser

QueryBrowser download (13k)

QueryBrowser for AX2012 (10k)


Often when we work with queries we need to see the result of the query. To do this usually we use QueryRun class: <xpp> QueryRun qr; qr = new QueryRun(query);

while(qr.next()) {

} </xpp>

To see necessary fields developer need to descriebe every field inside while loop. Like this: <xpp> 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...

} </xpp>

And how about analysing a dozen and more fields? To get rid this routine was developed QueryBrowser.

Features[edit]

QueryBrowser window
  • QueryBrowser allows browse queries from AOT or custom queries as such as TableBrowser works.

For browsing query use construction: <xpp> new DEV_QueryBrowser().run( _query ); </xpp> where _query - browsing query. e.g. : <xpp> new DEV_QueryBrowser().run( new Query(queryStr(InventSum)) ); </xpp>

QueryBrowser XML statement
  • 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.

Restrictions[edit]

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.

Feedback[edit]

If you have suggestions or questions, you may find me at Dynamics AX tips & tricks

Axforum Russland