Working with XSD files in AX 2012

Today I got a question from one of my colleagues… The needed to sent a complete AIF port specification to an external service provider and the XSD (XML Schema Description) the could find only contained the internal AX Types and it specifically lacked the information about maximum length for the fields.

Since I am not a developer and I am not that knowledgeable in the AOT I reached out to a couple of out developers. Thet is when I learned about Shared Types Schema . This contains the complete list of types and it also acts as sort of a translation table for the regular XSD and which is merged the exploring the service.

Not to self (once I forget this): The reason for having all the extended types in the original XSD is because we are able to change the field setup in AX and having it propagate to the entire system.

To get to the XSD for the AIF port you go to the port (System Administration – Setup – Services and Application Integration Framework). Select the port, verify that Customize Document is checked and clock Data Policies

Click on View Schema

Here you can see the XSD for the port. If you click Imported Schema you will open up the Shared Types Schema. Save both the regular Schema and the Shared Schema and send it to whoever needs it

About the Shared Types Schema

Validating SSRS settings in AX 2012 fails

Tonight one of my colleagues called me having issues with validating the SSRS setup for an old AX 2012 R3 environment. Unfortunately it had been many years since I even touched a 2012 server which meant I had to turn to my trusted advisor… Google 🙂

The error he got was this:
“Make sure that SQL Server Reporting Services is configured correctly. Verify the Web Service URL and Report Manager URL configuration in the SQL Reporting Services Configuration Manager.”


The problem is caused by UAC end there are 2 “solutons”

  1. Turning off UAT (which is absolutely NOT recommended).
    Error when validate settings in Report servers by any admin account which is not account used to install the AX reporting services extensions. – Microsoft Dynamics AX Forum Community Forum
  2. Running the AX client as Administrator. To do this right-click the AX 2012 Client (it has to be the client and not the .axc file) and slect “Run as Administrator”
    AX2012R2 SSRS Validation error as make sure the SQL Server Reporting Services is configured correctly – Microsoft Dynamics AX Community

That is it for today

Internal Error occurred executing stored procedure when creating session for the AOS

This is one I should have written down a long time ago…

When setting up a new database for AX 2012 and I am trying to start the service I am getting the following error:

Internal Error occurred executing stored procedure when creating session for the AOS.

The reason for this is that AX is looking for two Stored Procedure in the AX database  called CREATESERVERSESSIONS and CREATEUSERSESSIONS. If these are missing the service will not start. My temporary solution is that I script out the SPs from another database and create them where they are issing.



SSRS using wrong configuration

Everything that is printed in AX 2012 is using SQL Server Reporting Services (SSRS). It does this by connecting to AX when it is told to and gets the data. To find the settings for the AX Server it normally uses the default client configuration. In some cases (especially when you have multiple instances) this fails or SSRS is using the wrong configuration.

You can help SSRS by saving the correct configuration in  C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer\bin with the name Microsoft.Dynamics.AX.ReportConfiguration.axc

Have a nice day


Providing a clean database in upgrade mode for AX 2012

When we upgrade to AX 2012 the destination database needs to be in “upgrade mode” othewise the upgrade checklist it not triggered correctly. This can be done in one of two ways… either you check “Register this database for Upgrade” when you set up the AOS… this implies that you actually set up a new AOS. If you do not want to do that you can also do this:

1. Start SQL Management Studio and run this script:

WHERE NAME = ‘SysCheckList_Setup’
OR NAME LIKE ‘SysCheckList_Up%’


Activating Dynamincs AX 2012 VMs deployed to Azure from LCS

Our company has retired all of our lab hosts which we used to have internally which means thet we need to have our lab servers on Microsoft Azure. To install the servers we use LCS (Lice Cycle Services) which deploys a VM in our Azure Subscription. The problem is that the VM is not activated, which on an internal server would require a product key and a Windows Server License… When running VMs internally we used to handle this by rearming the VMs 3 times which gives us a total of 180 days and then set up a new one which was a little hassle but it worked. But since we now have deployed VMs on Azure there is actually a license included in the Azure VM which means that there is no need to run a server which is not activated. Here is a short description on how to activate the AX VM…

  1. Install the new VM on Microsoft Azure using LCS
  2. Log into the the server using RDP (the logon info is in LCS)
  3. Start an elevated command prompt
  4. Find the edition of the VM by running this command:

    DISM /online /Get-CurrentEdition

    We get: Current Edition : ServerDatacenterEval

  5. Find out which edition you can upgrade to by running:

    DISM /online /Get-TargetEditions

    We get: Target Edition : ServerDatacenter

    This means that you can upgrade from the evaluation edition of datacenter edition to the full version of datacenter edition. Now we need a license key… Microsoft uses Automatic Virtual Machine Activation to license the VMs in Azure… This means that if the host is activated (which it hopefully is Smile ) the guest gets activated but to use this feature the guest VM still need a product key. The keys are available on Technet.

  6. Use the correct key to activate the VM by running this:

    DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEULA

  7. Restart the VM and verify that is is not using Evaluation Edition anymore


That’s all for today


Issues with Retail Layout designer

One of my colleagues had an issue accessing the Screen Layout designer in the AX Client and I was a bit confused… it worked for me… This turned out to be two separate issues.

image    image

The first one was that he and I was logged into two different AOSes and the Retail Headquarter was not installed on the one he was logged on to… simple enough to fix… I simply installed it. The Retail Headquarter component includes some DLLS that are required. If you want to be able to run the Retail Layout Designer on a  client or terminal server you will need to install the retail components on the client/terminal server as well.

When we installed the Headquarter components we unfortunately missed the fact the we “probably should” install Expression Blend Sad smile (note to self… read all the instructions)


When we tried to start the Designer it crashed with this error.


I found information on this issue on LCS Issue Search (Link below). The trick is to install Expression Blend Dev Kit for .NET and then copy Microsoft.Expression.Interactions.dll and System.Windows.Interactivity.dll from “C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries” to “C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin”

When these issues was fixed and my colleague tried to start the Button Grid Layout he gets this error:


Normally the AX AOS Service user is used to access the AX database but in some cases the individual user needs to have specific access… below is a link to an article that describes steps involved



Email errors in AX 2012 R2

One of my customers have migrated to new servers for their AOSes, these are brand new Windoews Server 2012 R2 servers… nice. We hade one issue though… When trying to send emails using batch from a batch jog we got the following error:

Microsoft.Dynamics.Ax.Xpp.ClrErrorException: Exception of type ‘Microsoft.Dynamics.Ax.Xpp.ClrErrorException’ was thrown.

   at Microsoft.Dynamics.Ax.Xpp.CLRInterop.staticInvoke(String typeName, String methodName, Object[] parameters, Type type)

   at Dynamics.Ax.Application.WinAPIServer.cryptUnProtectData(Object[] _encryptedDataBlob) in WinAPIServer.cryptUnProtectData.xpp:line 39

   at Dynamics.Ax.Application.SysEmailParameters.password() in SysEmailParameters.password.xpp:line 18

   at Dynamics.Ax.Application.SysEmailDistributor.Processemails(Guid _emailProcessorId) in SysEmailDistributor.processEmails.xpp:line 39

   at Dynamics.Ax.Application.SysEmailDistributor.Run() in 78

   at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54

   at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13

   at BatchRun::runJobStatic(Object[] )

   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

   at BatchIL.taskThreadEntry(Object threadArg)

It took me some time to figure it out… Apparently the password for the SMTP account is saved in the AX database, but using an encryption key from the computer which saved it (a.k.a. the server that was retired) so when moving to the new server it was not able to read it. To fix it I simply entered the password again from the new server and Presto!


Error when syncing DataMart – Invalid column name ‘PARTITION’. Invalid column name ‘Key_’.

Todays issue is a problem with integrating Management Reporter CU 15 with AX 2012 R3. When doing the initial integration we got this error:

Invalid column name ‘PARTITION’.
Invalid column name ‘Key_’.

and the integration never finished. After doing some research online I found someone with this issue and the recommendation was to downgrade to Management Reporter CU13. When doing so we bumped into an error in CU 13 causing deadlocks in SQL. I called Microsoft support and got the recommendation to once again upgrade to CU15.

Here is a good place to insert some history:

The customer upgraded from AX 2012 Feature Pack directly to AX 2012 R3. Before upgrading from AX 2012 Feature Release to AX 2012 R3 we had installed MR CU13. In AX 2012 R2 Microsoft introduced a feature called PARTITION. This is used to be able to host AX in a multi tenant environment with isolated customers.

When installing Management Reporter (CU13 and Later) and integrating it to AX it creates three views in the database.


When we upgraded directly from AX 2012 Feature Release directly to AX 2012 R3 these views where migrated to R3 and when we installed CU15 these views were never updated (the PARTITION column was missing), Management Reporter just verified that they were there and thought all was fine.

  1. Resolution:
    Remove the integration
  2. Remove the three views
  3. Recreate the integration
  4. Enable the integration and sync the datamart

That is all for today


Issues with LCS System Diagnostics

I am working with a customer today and we are setting up LCS System Diagnostics on their AX 2012 R3 environment. They have quite a locked down environment which presents some challenges.

First of all we need to open outgoing traffic to LCS and to Azure from the server where we installed LCS according to Microsoft. The adresses are:


If you miss the Azure port no data vill be uploades since the upload is a Zipped file to an Azure Storage account