This small, helpful tool can be used in numerous
scenarios. The Table Browser tool lets you see the records in a table
without requiring you to build any user interface. This tool is useful
when you’re debugging, validating data models, and modifying or cleaning
up data, to name just a few uses.
You can access the Table Browser tool from the Add-Ins submenu in the AOT on:
Tables
Tables listed as data sources in forms, reports, Web forms, and Web reports
System tables listed in the AOT under System Documentation\Tables
Note
The Table Browser tool is implemented in X++. You can find it in the AOT under the name SysTableBrowser. It is a good example of how to bind the data source to a table at run time. |
Figure 1 shows the Table Browser tool started from the CustTable
table. In addition to the querying, sorting, and filtering capabilities
provided by the grid control, the Table Browser tool allows you to type
an SQL SELECT statement directly into the form using X++ SELECT
statement syntax and see a visual display of the result set. This tool
is a great way to try out complex SELECT statements. It fully supports
grouping, sorting, aggregation, and field lists.
The Table Browser tool
also allows you to choose to see only the fields from the auto-report
field group. These fields are printed in a report when the user clicks
Print in a form with this table as a data source. Typically, these
fields hold the most interesting information. This option can make it
easier to find the values you’re looking for in tables with many fields.
Note
The Table Browser tool is just a normal form that uses IntelliMorph. It can’t display fields for which the visible property is set to No or fields that the current user doesn’t have access to. |
Find Tool
Search is everything! The size of Dynamics AX applications calls for a powerful and effective search tool.
Tip
You
can use the Find tool to search for an example of how to use an API.
Real examples can complement the examples found in the documentation. |
You can start the Find tool, shown in Figure 2,
from any node in the AOT by pressing Ctrl+F or by clicking Find on the
context menu. The Find tool supports multiple selections in the AOT.
The Name & Location tab defines what you’re searching for and where to look:
In Search, the menu options are Methods and All Nodes. When you choose All Nodes, the Properties tab appears.
The Named text box limits the search to nodes with the name you specify.
The Containing Text box specifies the text to look for in the method expressed as a regular expression.
When
you select the Show Source Code check box, results include a snippet of
source code containing the match, making it easier to browse the
results.
By
default, the Find tool searches the node (and its subnodes) selected in
the AOT. If you change focus in the AOT while the Find tool is open, the
Look In value is updated. This is quite useful if you want to search
several nodes using the same criterion. You can disable this behavior by
clearing the Use Selection check box.
In the Date tab, you specify additional ranges for your search, such as Modified Date and Modified By.
On the Advanced tab, you
can specify more-advanced settings for your search, such as the layer to
search, the size range of elements, the type of element, and the tier
on which the element is set to run.
The Filter tab, shown in Figure 3,
allows you to write a more complex query by using X++ and type
libraries. The code written in the Source text box is the body of a
method with the following profile.
boolean FilterMethod(str _treeNodeName, str _treeNodeSource, XRefPath _path, ClassRunMode _runMode)
|
The example in Figure 3 uses the class SysScannerClass to find any occurrence of the TTSAbort
X++ keyword. The scanner is primarily used to pass tokens into the
parser during compilation. Here, however, it detects the use of a
particular keyword. This tool is more accurate (though slower) than
using a regular expression, because X++ comments don’t produce tokens.
The Properties tab appears
when All Nodes is selected in the Search menu. You can specify a search
range for any property. Leaving the range blank for a property is a
powerful setting when you want to inspect properties: it matches all
nodes, and the property value is added as a column in the results, as
shown in Figure 4. The search begins when you click Find Now. The results appear at the bottom of the dialog box as they are found.
Double-clicking
any line in the result set opens the X++ code editor with focus on the
matched code example. When you right-click the lines in the result set, a
context menu containing the Add-Ins menu opens.