Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Microsoft Dynamics AX 2009 : The MorphX Tools - Application Object Tree

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/13/2011 9:22:07 AM

1. Introduction

Dynamics AX includes a set of tools, the MorphX development tools, that allow developers to build and modify Dynamics AX business applications.The MorphX tools enable developers to create, view, modify, and delete the application model elements, which contain metadata, structure (ordering and hierarchies of elements), properties (key and value pairs), and X++ code. For example, a table element includes the name of the table, the properties set for the table, the fields, the indices, the relations, the methods, and so on.

You can find additional information and an overview of other MorphX tools in the MorphX Development Tools section of the Microsoft Dynamics AX software development kit (SDK) 2009 on MSDN.

Tip

To enable the development mode of Dynamics AX 2009, press Ctrl+Shift+D. Ctrl+Shift+D is a toggle key that also returns you to content mode.


Table 1 lists the MorphX tools.

Table 1. MorphX Tools
ToolUse This Tool To:
Application Object Tree (AOT)Start development activities. The AOT is the main entry point for all development activities. It is the repository for all elements that together comprise the business application. You can use the AOT to invoke the other tools and to browse and create elements.
Project DesignerGroup related elements into projects.
Property sheetInspect and modify properties of elements. The property sheet shows key and value pairs.
X++ Code EditorInspect and write X++ source code.
Label EditorCreate and inspect localizable strings.
Visual Form Designer and the Visual Report DesignerDesign forms and reports in a What You See Is What You Get (WYSIWYG) fashion.
CompilerCompile X++ code into an executable format.
Best Practices toolAutomatically detect defects in both your code and your elements.
DebuggerFind bugs in your X++ code.
Reverse Engineering toolGenerate Microsoft Office Visio Unified Modeling Language (UML) and Entity Relationship Diagrams (ERDs) from elements.
Table Browser toolView the contents of a table directly from the table element.
Find toolSearch for code or metadata patterns in the AOT.
Compare toolSee a line-by-line comparison of two versions of the same element.
Cross-reference toolDetermine where an element is used.
Version Control toolTrack all changes to elements and see a full revision log.
Unit Test toolBuild automated tests that can exercise your code and detect regressions.

You can access these development tools from the following places:

  • The Development Tools submenu on the Tools menu. From the Microsoft Dynamics AX drop-down menu, point to Tools, and then point to Development Tools.

  • The context menu on elements in the AOT.

Note

The Microsoft Dynamics AX SDK contains valuable developer documentation and is updated frequently. Find it in the Microsoft Dynamics AX Developer Center on msdn.microsoft.com.


You can personalize the behavior of many MorphX tools by clicking Options on the Tools menu. Figure 1 shows the Options dialog box.

Figure 1. Options dialog box, in which development options are specified



2. Application Object Tree


The AOT is the main entry point to MorphX and is the repository explorer for all metadata. You can open the AOT by clicking the AOT icon on the toolbar or by pressing Ctrl+D. The AOT icon looks like this:

Navigating the AOT

As the name implies, the AOT is a tree view. The root of the AOT contains the element categories, such as Classes, Tables, and Forms. Some elements are grouped into subcategories to provide a better structure. For example, Tables, Maps, Views, and Extended Data Types reside under Data Dictionary, and all Web-related elements are found under Web. Figure 2 shows the AOT.

Figure 2. Application Object Tree


You can navigate the AOT by using the arrow keys on the keyboard. Pressing the Right arrow key expands a node if it has any children.

Elements are ordered alphabetically. Because thousands of elements exist, understanding the naming conventions and adhering to them is important to effectively using the AOT.

All element names in the AOT follow this structure:

<Business area name> + <Business area description> + <Action performed or type of content>

In this naming convention, similar elements are placed next to each other. The business area name is also often referred to as the prefix. Prefixes are commonly used to indicate the team responsible for an element.

Table 2 contains a list of the most common prefixes and their descriptions.

Table 2. Common Prefixes
PrefixDescription
AxDynamics AX typed data source
AxdDynamics AX business document
BOMBill of material
COSCost accounting
CustCustomer
HRMHuman resources management
InventInventory management
JMGShop floor control
KMKnowledge management
LedgerGeneral ledger
PBAProduct builder
ProdProduction
ProjProject
PurchPurchase
ReqRequirements
SalesSales
SMAService management
SMMSales and marketing management
SysApplication frameworks and development tools
TaxTax engine
VendVendor
WebWeb framework
WMSWarehouse management

Tip

When creating new elements, make sure to follow the recommended naming conventions. Any future development and maintenance will be much easier.


Creating New Elements in the AOT

You can create new elements in the AOT by right-clicking the element category node and selecting New <Element Name>, as shown in Figure 3.

Figure 3. Creating a new element in the AOT


Objects are given automatically generated names when they are created. However, you should replace the default names with new names in accordance with the naming conventions.

Modifying Elements in the AOT

Each node in the AOT has a set of properties and either subnodes or X++ code. You can use the property sheet to inspect or modify properties, and you can use the X++ code editor to inspect or modify X++ code.

The order of the subnodes can play a role in the semantics of the element. For example, the tabs on a form display in the order in which they are listed in the AOT. You can change the order of nodes by selecting a node and pressing the Alt key while pressing the Up or Down arrow key.

A red vertical line next to an element name marks it as modified and unsaved, or dirty, as shown in Figure 4.

Figure 4. A dirty element in the AOT, indicated by a vertical line next to CustTable (sys)


A dirty element is saved in the following situations:

  • The element is executed.

  • The developer explicitly invokes the Save or Save All action.

  • Autosave takes place. You specify the frequency of autosave in the Options dialog box accessible from the Tools menu.

Refreshing Elements in the AOT

If several developers modify elements simultaneously in the same installation of Dynamics AX, each developer’s local elements could become out of sync with the latest version. To ensure that the local versions of remotely changed elements are updated, an autorefresh thread runs in the background. This autorefresh functionality eventually updates all changes, but you might want to explicitly force a refresh. You do this by right-clicking the element you want to restore and then selecting Restore. This action refreshes both the on-disk and the in-memory versions of the element. The following is a less elegant way of ensuring that the latest elements are used:

1.
Close the Dynamics AX client to clear in-memory elements.

2.
Close the Dynamics Server service on the Application Object Server (AOS) to clear in-memory elements.

3.
Delete the application object cache files (*.auc) from the Local Application Data folder (located in Documents and Settings\<User>\Local Settings\Application Data) to remove the on-disk elements.

Note

Before Dynamics AX 4.0, the application object cache was stored in .aoc files. To support Unicode, the file extension was changed to .auc in Dynamics AX 4.0.


Element Actions in the AOT

Each node in the AOT contains a set of available actions. You can access these actions from the context menu, which you can open by right-clicking the node in question.

Here are two facts to remember about actions:

  • The actions available depend on the type of node you select.

  • You can select multiple nodes and perform actions simultaneously on all the nodes selected.

A frequently used action is Open New Window, which is available for all nodes. It opens a new AOT window with the current nodes as the root. We used this action to create the screen capture of the CustTable element shown in Figure 3-4. Once you open a new AOT window, you can drag elements into the nodes, saving time and effort when you’re developing an application.

You can extend the list of available actions on the context menu. You can create custom actions for any element in the AOT by using the features provided by MorphX. In fact, all actions listed on the Add-Ins submenu are implemented in MorphX by using X++ and the MorphX tools.

You can enlist a class as a new add-in by following this procedure:

1.
Create a new menu item and give it a meaningful name, a label, and Help text.

2.
Set the menu item’s Object Type property to Class.

3.
Set the menu item’s Object property to the name of the class to be invoked by the add-in.

4.
Drag the menu item to the SysContextMenu menu.

5.
If you want the action available only for certain nodes, you need to modify the verifyItem method on the SysContextMenu class.

Element Layers in the AOT

When you modify an element from a lower layer, a copy of the element is placed in the current layer. All elements in the current layer appear in bold type (as shown in Figure 5), which makes it easy to recognize changes.

Figure 5. An element in the AOT that exists in several layers


You can use the Application Object Layer setting in the Options dialog box to personalize the layer information shown in the AOT. Figure 3-5 shows a class with the option set to All Layers. As you can see, each method is suffixed with information about the layers in which it is defined, such as sys, var, and usr. If an element exists in several layers, you can right-click it and select Layers to access its versions from lower layers. We highly recommend the All Layers setting during code upgrade because it provides a visual representation of the layer dimension directly in the AOT.

Note

If you modify an element that exists in a higher layer than your current layer, all modifications are redirected to the upper layer where the element is defined.

Other -----------------
- SQL Server 2008 : Backing Up the System Databases & Backup History
- SQL Server 2008 : Managing Backups - Using Encryption
- SQL Server 2008 : Managing Backups - Backups from T-SQL
- BizTalk 2009 : Ready-to-Bake BizTalk Performance Plan (part 4)
- BizTalk 2009 : Ready-to-Bake BizTalk Performance Plan (part 3) - What to Keep in Mind When Tuning
- BizTalk 2009 : Ready-to-Bake BizTalk Performance Plan (part 2) - Create, Execute, and Analyze
- BizTalk 2009 : Ready-to-Bake BizTalk Performance Plan (part 1) - Plan Your Tests
- Windows Small Business Server 2011 : Planning the Network Infrastructure (part 2)
- Windows Small Business Server 2011 : Planning the Network Infrastructure (part 1)
- Introducing Windows Small Business Server 2011
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server