What's new: MorphX features for developers

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3

This topic lists the new and enhanced features and tools for the Microsoft MorphX development environment that is available in Microsoft Dynamics AX 2012.

What is new or changed?

The following MorphX development features have been added or changed in AX 2012:

  • Models and the Model Store

  • Object IDs

  • The AxUtil Command Line Utility and PowerShell Cmdlets

  • Development Workspace

  • Some Layers Have Been Renamed

  • Installation-specific IDs

The following tools have been added or enhanced in AX 2012:

  • X++ Editor

  • Type Hierarchy Browser and Type Hierarchy Context

  • Unit Test Framework

  • Tools Used With Models and the Model Store

  • Code Upgrade Tools

Models and the Model Store

What can you do?

Microsoft Dynamics AX 2009

Microsoft Dynamics AX 2012

Why is this important?

Where can I find more information?

In earlier versions, application model data for Microsoft Dynamics AX was stored in a proprietary database that was named the Application Object Database (AOD). Each layer of the application had a corresponding .aod file. AX 2012 introduces the model store, which is based on Microsoft SQL Server. Use the model store to work with business data or customer data.

The model store did not exist. Application model data was stored in .aod files. You can load .aod files during version upgrade. You can also load .aod files by using the Tools menu.

The following model features are new:

  • A model is a set of model elements in a specific layer.

  • Each layer consists of one or more models. One of the models is generated by the system. For example, VAR Model is the model that is generated for the VAR layer.

  • Each element in a layer must belong to only one model.

  • Models can be exported to a file artifact that is known as a model file. Model files have an .axmodel extension. A model file is like an .aod file from earlier versions, but the names and numbers are not limited. Models in the model store can be exported to model files and imported from model files. Model files can be signed, and the signature is verified when the model files are installed.

  • Model files replace .aod files as installation artifacts.

  • Models in the model store replace .aod files that were used at run time.

  • Development is performed in the current model in a given layer. All development work, such as creating a new class, becomes part of the current model in the current layer. You can change the current model by clicking the name of the current model on the status bar. (This method resembles the method that is used to change the current company.)

  • Any element that is created in the current layer can easily be moved to another model in the same layer.

  • The Microsoft Dynamics AX Application Object Tree (AOT) shows the model that a particular element belongs to and also the layer tags.

  • The additional folder capabilities for version control have been renamed models, and the capabilities have been extended. When you add an element to version control, the element is added to the version-controlled model.

  • You can generate a MorphX project that contains all the application objects in the model. A new Model management submenu on the Tools menu contains many tools that you can use to work with models and the model store.

  • The new SysModel* system tables provide a view of the metadata that is associated with models. These tables let you use model metadata in select statements in your X++ code. For example, you can use the SysModelElementLabel table to retrieve the string value for the label that is associated with a particular model element.

Storing models in SQL Server increases quality, reliability, and performance. In addition, you can use the tools that are available in SQL Server for backup and administration.

Content is not yet available.

Object IDs

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

In earlier versions of Microsoft Dynamics AX, the number of object IDs that was available for application elements was limited, both in the range of IDs and by layer. In AX 2012, the 16-bit object ID is upgraded to 32 bits. This change exponentially increases the number of object IDs. Therefore, you no longer have to worry that you might run out of object IDs.

Object IDs were 16 bits long.

Object IDs are 32 bits long.

Changing the length of object IDs from 16 bits to 32 bits exponentially increases the number of object IDs that are available.

Content is not yet available.

The AxUtil Command-Line Utility and Windows PowerShell Cmdlets

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Use AxUtil to import and export application model data and work with the model store.

The feature was not available.

AxUtil is a command-line utility that you can use to import and export .axmodel files into the model store. You can also use AxUtil to delete one or more models, create new empty models, and list all the models in a layer.

All the capabilities of AxUtil are also exposed as Windows PowerShell cmdlets.

Users can use these tools to work with models from outside the development environment. Therefore, there are more options for scripting deployment processes.

Content is not yet available.

Development Workspace

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

In AX 2012, the development experience is separated from the application experience as a new workspace. You now use the development environment when you write code in Microsoft Dynamics AX.

Development occurred directly in the Application Workspace.

The Developer Workspace contains all the tools and features that a developer requires to create and customize a Microsoft Dynamics AX application. Changes that you save in the Development Workspace are always synchronized with the Application Workspace. You can still open application elements in the AOT. You can also open an Application Workspace from the Development Workspace to view your customizations.

You can open Microsoft Dynamics AX directly from a Development Workspace by using the Ax32.exe command-line flag /development.

The new Development Workspace provides a more streamlined environment for writing code. The menus have also been customized, so that you can more easily find the tools and commands that you use when you write code.

Content is not yet available.

Some Layers Have Been Renamed

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

In AX 2012, 16 layers are supported. Because multiple solutions can be installed in parallel in the same layer, some layers have been renamed to emphasize the new usage.

Old layer names:

USP

USR

CUP

CUS

VAP

VAR

BUP

BUS

SL3

SL2

SL1

HFX

GLP

GLS

SYP

SYS

New layer names:

USP

USR

CUP

CUS

VAP

VAR

ISP

ISV

SLP

SLN

FPP

FPK

GLP

GLS

SYP

SYS

The new layer names more accurately describe the usage of the layers.

Content is not yet available.

Installation-Specific IDs

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Object IDs, such as table IDs, field IDs, and class IDs, are now installation specific. Therefore, you no longer have to worry about conflicting object IDs in different installations.

Objects IDs were assigned when a model element was created.

When a new model element is saved, imported, or installed, a unique ID is assigned to the model element at that installation site.

For example, when a new class is added by a developer and saved to the model store, the class is assigned a class ID. However, when the same class is imported into another installation at a customer site, the class ID might differ from the ID that was assigned in the first installation site.

The new object IDs that are assigned for AX 2012 installations have a larger range than the previous object IDs and will not conflict with any of the earlier versions of Microsoft Dynamics AX.

In an upgrade scenario, object IDs are preserved, because they are automatically assigned to the new LegacyId property on the application objects.

Because IDs are installation specific, an ID is not assigned until installation time. Therefore, conflicts are avoided.

Because the assignment of object IDs is handled at the installation site, Team Server no longer has to manage IDs. Team Server is no longer installed, and the setup of version control no longer depends on Team Server.

Content is not yet available.

X++ Editor

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Develop Microsoft Dynamics AX applications in the X++ code editor.

The code editor was unique to Microsoft Dynamics AX.

The code editor is now based on the code editor for Microsoft Visual Studio, and includes many of the same features and shortcuts. The following new and changed features are available:

  • The method list displays all methods in the class. You can scroll through the list by using the mouse, and the list is automatically resized.

  • Basic editing functionality has been improved. For example, you can comment or uncomment code, move code by using a drag-and-drop operation, swap characters, delete a whole line, and change text in many other basic ways.

  • Code navigation is more like code navigation in Visual Studio. For example, you can use the Home key, navigate line ends, and go to the next or previous word as you do in Visual Studio.

  • It is easier to select code by using the margin or by using block selection, and word selection is improved.

  • Code rendering is improved. For example, the value of a label is displayed when you rest the mouse pointer on the label, and an indicator in the margin tracks your changes. Additionally, line numbers are displayed, the font is improved, there is more syntax coloring, and you can view whitespace.

  • You can search for code incrementally. Search uses .NET regular expressions.

  • IntelliSense has been improved. IntelliSense now includes word completion, tooltips that display the XML documentation comments for a method or class, and help for multiline parameters.

  • Errors in code are underlined by using a wavy line. When you rest the mouse pointer on the wavy line, the error message for the compiler is displayed. Code breakpoints can be toggled in the margin.

The new X++ editor adds features and is more familiar to developers who have worked with Visual Studio.

X++ Code Editor

Type Hierarchy Browser and Type Hierarchy Context

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

View detailed information about elements in the AOT and also information about the hierarchy of those elements.

You used the Application Hierarchy Tree.

Use the Type Hierarchy Browser to see detailed information about an element and its components, such as methods, fields, or properties, and the element from which the element inherits. In the form, you can view information about classes, tables, maps, views, extended data types (EDTs), and enumerations.

Use the Type Hierarchy Context to display a pane that shows the hierarchy details for a class, table, map, view, EDT, or enumeration that is selected in the AOT. Click any element in the tree to open the Type Hierarchy Browser for that object.

The Type Hierarchy Browser and Type Hierarchy Context provide more functionality than the Application Hierarchy Tree.

Type Hierarchy Browser

Type Hierarchy Context

Unit Test Framework

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Attach a predefined attribute to a test class or test method to provide more information.

The feature was not available.

Use predefined attributes to specify that a test is active, or that it is a check-in test. You can also use predefined attributes to provide the target element that you are testing.

A test can be self-describing with regard to organization and when the test is run. For example, to run only the check-in tests, you can attach an attribute to the test that indicates that the test is a check-in test.

How to: Organize Test Cases

Add custom attributes to further categorize test cases.

You categorized test cases by creating them and adding them to a test project.

Add attributes to test cases, or remove attributes, to provide detail. For example, to satisfy requirements for integration-level testing, you can attach an attribute to all tests that cross module boundaries.

A test can be self-describing with regard to organization and when the test is run.

How to: Categorize Test Cases Using Attributes

At a glance, know whether a test case passed or failed.

You viewed the test detail by clicking Details on the Unit Test toolbar. Alternatively, you displayed results by using a listener.

In a test project, an icon appears next to each test case to indicate whether the test case passed or failed.

At a glance, you can understand how well a given project is running.

How to: Organize Test Cases

If a test case fails, rest the mouse pointer on the test case to display the exception that occurred.

You accessed the exception detail in a listener.

In a test project, rest the mouse pointer on a failed test case to display the exception that occurred.

At a glance, you can know the exceptions that were introduced for a project.

How to: Organize Test Cases

Use test metrics to measure performance.

The feature was not available.

Click Details on the Unit Test toolbar to view how long the test case ran.

You can use the duration metrics to help improve performance.

How to: Run a Test Case

Use test metrics to guarantee the integrity of the test data that you start with.

The feature was not available.

Click Details on the Unit Test toolbar to view the number of records that were updated in the database.

You can use the metrics that indicate the number of records that were updated to troubleshoot data integrity issues. When you run successive test cases, the integrity of the data that you start with for each test is very important.

How to: Run a Test Case

Tools Used With Models and the Model Store

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Select the model to work with.

The feature was not available.

Use the Change Current Model tool to select the model to work with.

You can now change the current model.

How to: Specify the Current Model

Use the Create Project from Model form.

The feature was not available.

Use this form to create a project from the contents of a model.

You can now create a project that contains only the contents of a model.

Create Project from Model Form

Use the Create Model Tool form.

The feature was not available.

Use this form to create a new model.

You can now create a new model.

How to: Create a New Model

Use the Import AOD File form.

The feature was not available.

Use this form to load an .aod file from an earlier version of Microsoft Dynamics AX into the model store.

You can now load an .aod file from an earlier version of Microsoft Dynamics AX into the model store.

Import AOD file (form)

Code Upgrade Tools

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Detect conflicts when code is upgraded.

The feature was not available.

Use the Detect Code Upgrade Conflicts tool to analyze a system, and then create projects that contain the application objects that must be upgraded manually.

You can now see how much manual work is required to upgrade from an earlier version of Microsoft Dynamics AX.

Detect code upgrade conflicts (form)

Migrate EDT relations.

The feature was not available.

Use the EDT Relation Migration tool to move the previous relations that are defined under the EDT nodes in the AOT to the table nodes.

In earlier versions of Microsoft Dynamics AX, the relations of tables to EDTs were stored in two locations: relations in tables and relations in EDTs. In the current version of Microsoft Dynamics AX, relations in EDTs are obsolete. Instead, we recommend that developers migrate their EDT relations to table relations. The EDT Relation Migration tool makes it easy to transfer relations from EDTs to tables.

EDT Relation Migration Tool

See also

What's New in Microsoft Dynamics AX 2012 for Developers