PDF The popular standard, which reproduces the look and layout of the printed page. This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
About eBook formats. Dig into the architecture and internals of Microsoft Dynamics AX R3 - with firsthand insights from the team that designed and developed it.
Deepen your knowledge of the underlying frameworks, components, and tools - and deliver custom ERP applications with the extensibility and performance your business needs.
NET and SharePoint for rich web-based apps Simplify process automation with built-in workflow infrastructure See how the runtime implements security and configuration Design and customize the user experience Gain greater control over complex batch jobs Customize the prebuilt BI solution and reporting Test applications, publish services, and optimize performance.
Download the sample content. If you find an error, you can report it to us through our Submit errata page. Sign in. Personalize Community Now. Visit Microsoft Learn. ColdIce asked a question on 30 May PM. Thanks New Learner. Microsoft Dynamics AX current version. Replies 2 All Responses. Sohaib Cheema responded on 30 May PM. Note that only warnings caused by actual code can be suppressed this way, not warnings caused by metadata.
After you set up the best practices, the compiler automatically runs the best practices check when- ever an element is compiled. The results are displayed in the Best Practices list in the Compiler Output dialog box.
Some of the metadata best practice violations can also be suppressed, but the process of suppress- ing them is different. Instead of adding a comment to the source code, you add the violation to a global list of ignored violations.
This allows for central review of the number of suppressions, which should be kept to a minimum. Adding custom rules You can use the Best Practices tool to create your own set of rules. You call the init, check, and dispose methods once for each node in the AOT for the element being compiled. Compiling this sample code results in the best practice errors shown in Table Ensure that you cache the names to prevent the compiler from going to the disk to read the names for each method being compiled.
This is one of the valuable checks that ensures that the code can easily be kept up to date, which helps avoid mistakes. In this case, k was not intended for a specific purpose and can be removed. The debugger is a stand-alone application, not part of the AX shell like the rest of the tools mentioned in this chapter. The debugger starts automatically when any component hits a breakpoint. This is normally ensured by using setup, but if you did not set up AX by using your current account, you need to do this manually through Edit Local Users And Groups in Windows Control Panel.
This is necessary to prohibit unauthorized debugging, which could expose sensitive data, provide a security risk, or impose unplanned service disruptions. If you do, execution will stop when it hits a breakpoint, and the client will stop responding to users.
Running the application with debug support enabled also noticeably affects performance. You can set a breakpoint on any line you want. A breakpoint on the last brace will never be hit. Each devel- oper has his or her own set of breakpoints. This means that your breakpoints are not cleared when you close AX and that other AX components can access them and break where you want them to.
Debugger user interface The main window in the debugger initially shows the point in the code where a breakpoint was hit. You can control execution one step at a time while inspecting variables and other aspects of the code. Figure shows the debugger opened to a breakpoint with all the windows enabled. Each variable has a ScreenTip that reveals its value.
You can drag the next-statement pointer in the left margin. Variables window Shows local, global, and member variables, along with their names, values, and types. Local variables are variables in scope at the current execution point.
Global variables are variables on global classes that are always instantiated: Appl, Infolog, ClassFactory, and VersionControl.
Member variables are shown on classes. If a variable is changed as you step through execution, it is marked in red. Each variable is associated with a client or server icon.
You can modify the value of a variable by double-clicking the value. Call Stack window Shows the code path followed to arrive at a particular execution point. Clicking a line in the Call Stack window opens the code in the Code window and updates the local Variables window. A client or server icon indicates the tier on which the code is executed.
Watch window Shows the name, value, and type of the variables. Five different Watch windows are available. You can use this window to inspect variables without the scope limitations of the Variables window. You can drag a variable here from the Code window or the Variables window. Breakpoints window Lists all your breakpoints. You can delete, enable, and disable the breakpoints through this window. This information is especially useful when you are debugging incoming web requests.
When this level reaches zero, the transaction is committed. The defaults for classes are New and Null. You can change the defaults by overriding the toString method. Step over F10 Step over the next statement. Step into F11 Step into the next statement. Reverse Engineering tool You can generate Visio models from existing metadata. The Reverse Engineering tool is a great aid when you need to visualize metadata. You can also open the tool by selecting Reverse Engineer from the Tools menu.
In the dialog box shown in Figure , you must specify a file name and model type. When you click OK, the tool uses the metadata for all elements in the project to generate a Visio document that opens automatically. You can drag elements from the Visio Model Explorer onto the drawing surface, which is initially blank. Any relationship between two elements is automatically shown.
You can include these items in your diagrams without having to run the Reverse Engineering tool again. All attributes are marked as public to reflect the nature of fields in AX Each attribute also shows the type. The primary key field is underlined. If a field is a part of one or more indexes, the field name is prefixed with the names of the indexes; if the index is unique, the index name is noted in braces.
This is also known as a UML aggregation, represented by a white diamond. A cascading delete action ties the lifespan of two or more tables and is represented by a black diamond. To simplify the diagram, some attributes have been removed. The name of an association endpoint is the name of the relationship. The names and types of all fields in the relationship appear in braces. The UML model also contains attributes and operations, including return types, parameters, and the types of the parameters.
To simplify the view, some attributes and operations have been removed and operation parameters are suppressed. You can include these elements in your diagrams without having to run the Reverse Engineering tool again. All fields are generated as public attributes, whereas member variables are generated as protected attributes.
Methods are generated as UML operations, including return type, parameters, and the types of the parameters. The Reverse Engineering tool also picks up any generalizations classes extending other classes , realizations classes implementing interfaces , and associations classes using each other. The associa- tions are limited to references in member variables. The entity relationship model contains an entity type for each AOT table in the project and attributes for the fields in each table.
You can use the site to quickly get detailed infor- mation about a large number of tables. Fields in AX are generated as entity relationship columns. The EntityRelationshipRole property of the relationship is used as the foreign key role name of the relation in the entity relationship data model.
Afterward, you can drag relevant tables from the Tables And Views pane available from the Database tab to the diagram canvas. Table Browser tool The Table Browser tool is a small, helpful tool that can be used in numerous scenarios. You can browse and maintain the records in a table without having to build a user interface.
It is a good example of how to bind the data source to a table at run time. Figure shows the Table Browser tool when it is started from the CustTrans table. It fully supports grouping, sorting, aggregation, and field lists. You can also 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. Find tool Search is everything, and the size of AX applications calls for a powerful and effective search tool.
Real examples can complement the examples found in the documentation. The Find tool supports multiple selections in the AOT. If you choose All Nodes, the Properties tab appears.
By default, the Find tool searches the node and its subnodes selected in the AOT. This is quite useful if you want to search several nodes by using the same criterion. You can disable this behavior by clearing the Use Selection check box. The scanner is primarily used to pass tokens into the parser during compilation.
Here, however, it detects the use of a particular keyword. The Properties tab appears when All Nodes is selected in the Search list. 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 The search begins when you click Find Now.
The results appear at the bottom of the dialog box as they are found. When you right-click the lines in the result set, a context menu containing the Add-Ins menu opens. These versions might emanate from various layers or revisions in version control, or they could be modified versions that exist in memory. AX has a built-in Compare tool that highlights any differences between two versions of an element. Starting the Compare tool To open the Compare tool, right-click an element, and then click Compare.
A dialog box opens where you can select the versions of the element you want to compare, as shown in Figure The versions to choose from come from many sources. This allows you to compare an older version of an element with its latest version.
The ver- sion control system is explained later in this chapter. To get the full benefit of this, select the Case Sensitive check box on the Advanced tab. Objects in bold already exist in the application. The requirement for upgrading a class arises during a version upgrade. The Create Upgrade Project step in the Upgrade Checklist automatically detects customized classes that conflict with new versions of the classes.
The installation program ensures that the right versions are available in the right places during an upgrade. Conflict resolution is shown in Figure This option is selected by default.
This option is cleared by default. This option is cleared by default but can be useful during an upgrade of large chunks of code. Using the Compare tool After you choose elements and set parameters, start the comparison by clicking Compare.
Results are displayed in a three-pane dialog box, as shown in Figure The top pane contains the elements and options that you selected, the left pane displays a tree structure resembling the AOT, and the right pane shows details that correspond to the item selected in the tree.
Color-coded icons in the tree structure indicate how each node has changed. A red or blue check mark indicates that the node exists only in a particular version.
A gray check mark indicates that the nodes are identical but one or more subnodes are different. Details about the differences are shown in the right pane. Color coding is also used in this pane to highlight differences the same way that it is in the tree structure.
If an element is editable, small action icons appear. These icons allow you to make changes to code, metadata, and nodes, which can save you time when performing an upgrade. A right or left arrow removes or adds the difference, and a bent arrow moves the difference to another position. These arrows always come in pairs, so you can see where the difference is moved to and from. If a version control system is in use, an element is editable if it is from the current layer and is checked out.
You can use the available APIs to compare and present differences in the tree structure or text representation of any type of entity. Basically, it creates a text representation of a customer. It provides the context for comparison. Figure shows a comparison of two customers, the result of running the tutorial.
The static run method on the SysCompareText class, shown in the following code, takes two strings as parameters and returns a container that highlights differences in the two strings. You can also use a set of optional parameters to control the comparison. If an element uses another element, the reference is recorded. With cross-references, you can determine which elements a particular element uses and which elements other elements are using. AX provides the Cross-Reference tool for accessing and managing cross-reference information.
You must update the Cross-Reference tool regularly to ensure accuracy. The update typically takes several hours. The footprint in a database is about 1. Updating the Cross-Reference tool also compiles the entire AOT because the compiler emits cross-reference information.
If you work in a shared development environment, you share cross-reference information with your team members. Updating the Cross-Reference tool nightly is a good approach for a shared environment. If you work in a local development environment, you can keep the Cross-Reference tool up to date by enabling cross-referencing when compiling.
This option slows down compilation, however. Another option is to update cross-references manually for the elements in a project. It is primarily used by the query form and the Reverse Engineering tool. The information that the Cross-Reference tool collects is quite comprehensive. You can find a com- plete list of cross-referenced elements by opening the AOT, expanding the System Documentation node, and clicking Enums and then xRefKind.
An intrinsic function can evaluate to either an element name or an ID. Using intrinsic functions provides two benefits: you have compile-time verification that the element you reference actually exists, and the reference is picked up by the Cross-Reference tool.
Also, there is no run-time overhead. When you view cross-references for a class method, the Application hierarchy tree is visible, so that you can see whether the same method is used on a parent or subclass. With the quality standard, all changes are verified according to coding practices.
When modifications are ready, they can be checked in and made available to consumers of the build. A developer can rewrite fundamental areas of the system without causing instability issues for others. Developers are also unaffected by any downtime of a centralized development server. AX supports three version control systems: Visual SourceSafe 6.
Table shows a side-by-side comparison of the version control system options. The file format used is the standard Microsoft Dynamics AX export format.
There are no additional infrastructure requirements when you use MorphX VCS, which makes it a perfect fit for partners running many parallel projects. In such setups, each developer often works simultaneously on several projects, toggling between projects and returning to past projects. Faster previews. Personalized experience. Get started with a FREE account.