What's New: AOS and Database for Developers in Microsoft Dynamics AX 2012

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

This topic describes the new and enhanced features that are available for Microsoft Dynamics AX Application Object Server (AOS) in Microsoft Dynamics AX 2012.

What is new or changed?

The following improvements were made in AOS:

  • Valid Time State Tables

  • UnitOfWork Class

  • Inheritance Among Tables

  • Full Text Index

  • TempDB Temporary Tables

  • Computed Columns in Views

  • Filters for Outer Join

  • Add a Having Clause to a Query in the AOT

  • Effect of Disabling a Table

Gg841655.collapse_all(pl-pl,AX.60).gifValid Time State Tables

What can you do?

Microsoft Dynamics AX 2009

AX 2012

Why is this important?

Where can I find more information?

Let the system automatically manage data relationships that are valid only during a specified date range.

The feature was not supported.

You can set the ValidTimeStateFieldType property on a table to make it a valid time state table. The system then automatically adds the ValidFrom and ValidTo columns that track a date range in each row.

The system ensures that the values in these date fields remain valid by automatically preventing overlap among date ranges, based on the primary key value. The X++ select statement has the validTimeState keyword, so that rows can be filtered by date or date range. The Query class has properties, such as ValidTimeStateDateTimeRange, that provide a filter by date range.

The code that manages data relationships over date ranges is complex. Now, Microsoft Dynamics AX can manage these relationships for you.

For more information, see Valid Time State Tables and Date Effective Data.

Gg841655.collapse_all(pl-pl,AX.60).gifUnitOfWork Class

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Manage the operation sequence and transaction integrity for row-based database operations.

The feature was not supported.

You can use the UnitOfWork class to safely manage the operation sequence and transaction integrity for row-by-row database deletes, inserts, and updates. First, register each SQL data modification call with the UnitOfWork object. Then, by using one method call, you instruct the object to run the data modification calls. The object calculates the correct sequence used to run the data modification calls.

Application programmers who perform a set of data modification calls no longer have to track every detail of foreign key relationships. The UnitOfWork class helps enforce transaction integrity.

For more information, see How to: Use the UnitOfWork Class to Manage Database Transactions.

Gg841655.collapse_all(pl-pl,AX.60).gifInheritance Among Tables

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Let a table inherit fields, methods, and relationships from another table.

The feature was not supported.

Just as an X++ class could inherit from another X++ class in AX 2009, a table can inherit from another table in AX 2012. As in earlier releases, the Common table is still the base table of every table.

A table that inherits from a base table is called a derived table. The terms parent table and child table describe foreign key relationships, not inheritance.

Table inheritance can improve the design of data models and reuse of schema components.

For more information, see Walkthrough: Creating Base and Derived Tables.

Gg841655.collapse_all(pl-pl,AX.60).gifFull Text Index

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Create a full text index on a table.

The feature was not supported.

A full text index has a separate entry for each significant word in a string field. The QueryRange class can enable an instance of the Query class to benefit from a full text index.

This feature supports full text queries. Full text queries improve the performance of SQL statements that have a where clause condition that is directed at a word that is embedded in the middle of a string field.

For more information, see How to: Create a Full Text Index.

Gg841655.collapse_all(pl-pl,AX.60).gifTempDB Temporary Tables

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Have a temporary table of the TempDB type.

Only temporary tables of the InMemory type were supported.

In the properties for a table in the Microsoft Dynamics AX Application Object Tree (AOT), the TableType property is now an enum property. The enum value InMemory is the legacy type of a temporary table that is hosted in the client. The enum value TempDb is the new type of temporary table that is hosted in the TempDb database of the underlying Microsoft SQL Server. TempDB temporary tables can be joined with regular tables on the database tier. By joining TempDB temporary tables with regular tables, you can often improve performance and simplify the programming model.

TempDB temporary tables can be joined with regular tables on the database tier. By joining TempDB temporary tables with regular tables, you can often improve performance and simplify the programming model.

For more information, see Temporary TempDB Tables.

Gg841655.collapse_all(pl-pl,AX.60).gifComputed Columns in Views

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Have a computed column in a view.

The feature was not supported.

A computed column is the output of a computation that uses a regular column as input.

By using a computed column, you can simplify application development. Various parts of the client code can all rely on the computed column that is processed by the server in one location.

For more information, see Walkthrough: Add a Computed Column to a View.

Gg841655.collapse_all(pl-pl,AX.60).gifFilters in Outer Joins

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Implement filtering of the result set from an outer join.

The feature was not supported.

You can use the new QueryFilter class to filter the result set from an outer join. The QueryFilter class can produce different results to those of the QueryBuildRange class in outer joins. The QueryFilter class filters later in the process for internal queries and can prevent rows that have null values from appearing in the result set.

By filtering the result set from an outer join, you can reduce the number of rows that the database server must scan.

For more information, see How to: Use the QueryFilter Class with Outer Joins.

Gg841655.collapse_all(pl-pl,AX.60).gifAdd a Having Clause to a Query in the AOT

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Use the AOT to add a having clause on the data source for a query.

The feature was not supported.

The AOT now has a Having node under Queries > MyQuery > Data Sources. This node corresponds to the having clause in standard SQL.

In a query, you can now specify a filter condition for an aggregate value.

For more information, see Walkthrough: Creating an AOT Query that has Group By and Having Nodes.

Gg841655.collapse_all(pl-pl,AX.60).gifEffect of Disabling a Table

What can you do?

AX 2009

AX 2012

Why is this important?

Where can I find more information?

Retain the table in the underlying SQL Server database when the table is disabled in Microsoft Dynamics AX.

The underlying table was dropped as soon as it was disabled.

When you disable the configuration key for a table that is listed in the AOT, the corresponding table in the underlying database management system is not dropped. When you modify a configuration key to disable a table, you must decide whether you want to manually delete the data that is in the table.

External programs and SQL Server cubes no longer fail when you disable a table. The programs and cubes can continue to read the data from the table, because they bypass AOS.

You must decide whether you want external processes to continue to read from the disabled table.

For more information, see Effect of Disabling a Table or Column.

See also

What's New in Microsoft Dynamics AX 2012 for Developers