Wednesday, April 4, 2012

Discard USR Layer Changes in AX 2012

With the advent of model management in Dynamics AX 2012, Microsoft has gotten rid of the ax.aod files which in previous versions of DAX constituted the layers.
In DAX 2012 adjustments for the meta data model and code are stored in the modelstore in the database.

In previous version deleting a layer containing adjustments to the standard application consisted of delete the ax.aod file and synchronizing and compiling.

How is this done in DAX 2012 ?

The answer is a command-line tool called AxUtil.

To delete e.g. the usr-layer in the application do the following:

1) Shut down all AOS-servers but one (applicable only if you have more than one AOS running).
2) Go to command line interface on the server where the last AOS is running.
3) Go to the folder where DAX's management utilities are placed, e.g.
C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities
4) Run the Axutil like this:
Axutil delete /layer: /db:


To delete the usr-layer in the MicrosoftDynamicsAx database:
Axutil delete /layer:usr /db:MicrosoftDynamicsAxBelow an example is shown:
















5) Restart the AOS
6) Start the DAX client.
7) In the process of starting up, DAX will detect that something has happened with the modelstore, and prompt you with:





























Choose the action appropriate for your situation.
8) Start the remaining AOSes.

Enjoy DAX!!!