Wednesday, December 5, 2012

AX 2012 - AOS Crash Kernel Hotfix

Hi All

Below the last Kernel Hotfix about AOS Crash ( KB Article Number : 2787191 ) :

Finally, here a complete list of all Kernel Hotfix about AOS Crash issue :

Client crash when selecting record in form's derived table's referencegroup fieldyesdir            

2724568               6.0.1108.1260

System crash when posting intercompany invoice         

2726353               6.0.1108.1331

Client crash when removing multiple users from a security role

2728524               6.0.1108.1339

Generate Incremental CIL causes AOS to crash if CIL code is executed at the same time            

2729087               6.0.1108.1363

AOS crash on development environment using 8 GB and 16 total          

2730676               6.0.1108.1399

Client crash when performing impact analysis against CU-3       

2730777               6.0.1108.1413

Adding an EDT with the reference table property set, Crash the AX Client when on "Confirm adding relation" dialog "yes" is cliccked               

2738534               6.0.1108.1682

AOS crash stack overflow relating to SqlConnectBase::setContext() with multiple SQL statement trace enabled           

2739574               6.0.1108.1707

Client crashes in the query lookup         

2745617               6.0.1108.1894

Request for port of AX6 bug 301574 to the 6.0/6.1 branch - AOS crashing in Ax32Serv!interpret::xal_asg_sym_opr      

2748615               6.0.1108.1932

Client crash when system parameters is set to en for the default language and trying to enter workflow language instructions       

2748479               6.0.1108.1956

AX is crashing while opening edit payment praposal form from Payment journal[ALL ON]         

2758284               6.0.1108.2216

AOS crash during compilation after installing CU3           

2764075               6.0.1108.2360

[Revert of 316400] Client crashes when hovering over method resolve of class SysWorkFlowHierarchyProvider            

2768644               6.0.1108.2506

AOS crash when trying to covert Blank string to ENUM using a custom webservice in AIF          

2778096               6.0.1108.2753

AX client crash when form personalization with moving button from actionpane to page          

2780317               6.0.1108.2844

RFH: DAXSE_314175 (Inactive plan versions are never cleaned up in case of AOS crash) failing whilie clearing all pending orders if AOS crashed

2779941               6.0.1108.2860

AX client crashes exporting to Excel      

2785905               6.0.1108.3031

Running aximpactanalysis.exe in KB Article Number (s) : 2765336 crashes.        

2786562               6.0.1108.3068
Enjoy !

Friday, November 30, 2012

AX 2012 - SQL Server Collation

There is a difference in collation setting between SQL Server default collation setting used for system databases (Master, Model, Msdb, TempDB) and the Microsoft Dynamics AX database . Latin1_General_CI_AS_KS_WS  v.s. Latin1_General_CI_AS


Database Name
Collation name

It is recommended that the collations of user-defined databases match the collation of master or model. Otherwise, collation conflicts can occur that might prevent code from executing. For example, when a stored procedure joins one table to a temporary table, SQL Server might end the batch and return a collation conflict error if the collations of the user-defined database and the model database are different. This occurs because temporary tables are created in TempDB, which bases its collation on that of model.


If you experience collation conflict errors, consider one of the following solutions:

·        Export the data from the user database and import it into new tables that have the same collation as the master and model databases.

·        Rebuild the system databases to use a collation that matches the user database collation. For more information about how to rebuild the system databases, see Rebuilding System Databases (


More information can be found here:
Windows Collation Name (Transact-SQL)

Here you can find a good post that explain the difference between collation Latin1_General_CI_AS (United Kingdom) respect SQL_Latin1_General_CP1_CI_AS (United States).
It’s better to use Latin1_General_CI_AS collation because is a Windows collation and the rules around sorting unicode and non-unicode data are the same.

Difference between collation SQL_Latin1_General_CP1_CI_AS and Latin1_General_CI_AS


AX 2012 - Developer Resources

Sunday, November 25, 2012

Raid Disk space utility


Interesting utility for calculate a Disk space according with the Raid type.

Raid Disk space utility


Sunday, November 18, 2012

SSRS Report AX 2012 - The operation has timed out error message when you run a report in Microsoft Dynamics AX


About this problem, read below and test to find if this will have improved SSRS Report performance:

There is a process to change long running jobs so that they are run in a Pre-Processing way, so that all the data is prepared before the SSRS Report Window is started. This prevents the timeout problem, sometimes shown by the message ““A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond”

To change the report to run in these pre-processing way ( Similar Sales confirmation, Sales Invoice, etc. reports ), see this example below for the Dimension Statement report on how to change this:


1.    To find which object you need to modify, first look in the AOT > Menus, for the Menu where the report is
2.    View the properties on this to see the associated menu item. You can see below the menu item is “LedgerDimensionTransStatement”.

3.    Find this menu item in AOT > Menu Items > Output

…and look at the properties, make a note of the “LinkedPermissionObject”, in this case “LedgerTransStatement”

4.    Next in the AOT > SSRS Reports > Reports, locate LedgerTransStatement, then expand this out until you see the Server Methods. Make a note of the Server Method class, in this case “LedgerTransStatementDP”

5.    In the AOT > Classes, locate and open class LedgerTransStatementDP.

6.    In the LedgerTransStatementDP\classDeclaration, change line 9 to extend SrsReportDataProviderPreProcess instead of SrsReportDataProviderBase

7.    Make a note of the Temp table used in the report, as above this is LedgerTransStatementTmp.

8.    Next, change the method LedgerTransStatementDP\processReport to add the following line after the contract (line 27):



9.    Next, in AOT > Data Dictionary > Tables, locate the table you made a note of in point 7, so in this case the LedgerTransStatementTmp. Change the table properties as follows:


·         TableType = Regular

·         CreatedBy = Yes

·         CreatedTransactionId = Yes


10. Opened LedgerTransStatement.Detail report in Visual Studio and refreshed the data source to include new field (CreatedTransactionId).

11. Deployed the new LedgerTransStatement.Detail report.

12. In AX, did a Generate Incremental CIL.

13. Restart SSRS

Also, at this link

Microsoft Dynamics AX 2012 Reporting: How to run reports that executes longer than 10 minutes

The operation has timed out" error message when you run a report in Microsoft Dynamics AX 2012

AX 2012: Report timeout error

How To: Addressing SSRS Session Timeouts

you can find useful information about modify the SQL Reporting Send Timeout Parameter.



Wednesday, November 7, 2012

Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages could not be found

Hi All

If you have the follow error :

"The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be found"
during Enterprise portal navigation, try to delete the entrance in your web.config of EP application.

See also

Enjoy !

Upgrade Dynamics AX 4.0/2009 to AX 2012 R2 with AX Rehost Solution


For the Customers with many Dynamics AX personalizations, upgrade process could take long time and to be very expensive.

For this reason, we have create a .NET Solution that move the Entire AX 4.0/2009 Application ( Entire AOT ) to AX 2012 R2.

Customer scenario and needs

- Customer is using AX4/AX2009
- AX4 SP2 exited mainstream support since 11/10/2011
- Current AX4/AX2009 implementation are complex
- Many customizations and interfaces
- AX4/AX2009 implementation are multi country
- Customer wants/needs upgrade to AX 2012 R2 (instead of buying AX4/AX2009 extended support)
- «Big bang» upgrade to AX 2012 approach is unrealistic
- Customer needs a quick and cost effective solution to decouple the Technical upgrade from the Application upgrade
   - To adopt a «big bang» approach for the Technical upgrade
   - To adopt a «phased» approach for the Application upgrade
   - Upgrade companies in separate steps. Customize Intercompany between AX 2012 to AX 4/2009 and viceversa.

Value proposition

- Decoupling the Technical upgrade from the Application upgrade
- Quick and cost effective AX4/AX2009 rehosting solution using :
    - AX4/AX2009 Application
    - AX 2012 R2 Kernel
- Ability to upgrade the application in phases
- Ability to use AX 2012 R2 technical features
      64bit Kernel, Support for SQL 2012, Windows Server 2012, Windows 8, SQL Reporting, SQL Analysis, Workflow, WEB Services, Excel Add-In, etc.

AX4/2009Rehost – Technical details

AX4/2009 Rehost solution is sold as a service and uses a series of proprietary .NET tools that execute the following functions:
      - Export AX4/2009 AOT objects (all layers including SYS) and rename objects using a prefix
      - Conversion of AX4/2009 AOT objects syntax to AX 2012 R2 and remap the objects to use the new AX 2012 kernel interfaces
      - Import of the converted AX4/2009 AOT objects into AX 2012 R2 in the VAR Layer (Model AX Rehost)
      - Import of AX4/2009 Data tables with specific conversions (i.e. TableId and FiledId)
      - Manual steps must be performed to redefine the menu structure and to test the new environment

Enjoy !


Tuesday, November 6, 2012

Office Add-in work also with a non Admin AX user

Hi all

If an AX user haven't Sys Admin Role and don't use an AIF service, can't read and publish data with Office Add-in

The workaround is :

1- Add privilege AIFGenericDocumentService to the Role Systemuser. This permit the access to the class AIFGenericDocumentService

2- Add the table AifGdsCache to the permission of the Role Systemuser. This table is necessary for the cache using by Add-in

3- Add to the user the role Systemuser and the roles related the specific area

With this workaround you can't add a table to Excel, but you can prepare a Excel file with an AX Admin user and share with other non Admin AX users.

Enjoy !

Monday, October 29, 2012

Find property names with a specific value in AOT


In the link below you can find useful informations about search a Property name with or without value in AOT !

How to: Search Application Object Properties

Enjoy !

Friday, October 5, 2012

AX 2012 - TextBuffer Regular Expressions


Below a link with an example of TextBuffer Class with Regular Expressions feature :

X++ TextBuffer Usage

Write data to a text file through X++ in ax 2012

Thursday, October 4, 2012

AX 2012 - Windows 8 running SQL2012 and AX2012

AX 2012 - Workflow Development in few steps


With the link below you can find useful information about creation a Workflow types quicky.

Dynamics AX 2012 - Workflow Development in 2 hrs

For complete successfully the process, is necessary other two steps :

Step 9:
Move the approval Node or Task Node inside the new WorkFlow Type under the node Supported Elements otherwise in the graphical tool will not appear this elements
Step 10:
Close Axapta Session an reopen axapta
Enjoy !

AX 2012 - Print destination settings dialog does not show up


Here a link that fix an issue related the report print destination form that does not show up.

AX 2012 Print destination settings dialog does not show up due to WMI error

Transactional Replication with AX

Below some link useful for activate transactional Replication in AX :

SQL Server topology

Here you can find a Class that goes through all the tables in the AOT. It checks to see if there is a primary key, then if there is not one, it will set the table to have a RecId Index (if not already set). The final step then makes the RecId index the primary key index.

Transactional Replication with AX 2009

If there is an interesting requirement where our client have offices that are located in different locations. The Internet connection is not that stable between the head office and all this office......
Suggessions to maintain two database on same application in axapta


Tuesday, October 2, 2012

AX 2012 - Upgrade Entire AOD


Today I was working on Upgrade from AX 2009 to AX 2012.

I moved the AXBUS.AOD with lots of Custom Objects into AX 2012.
After that, I have found a lot of standard tables and classes (on FPK Model Layer) with the method of the Custom BUS Objects!

The reason is related to the IDs. Practically the BUS Custom Objects of AX 2009 had the same IDs of the Standard Objects (On FPK Model Layer) in AX 2012

Enjoy !

AX 2012 - Set up file formats for the export of a financial statement report (form)

Hi All

Today I have tried to run the Financial Statement Report (form) in AX 2012 to Excel Format with an error during export process.

After some investigations, you can export to Excel only if Excel or Excel Viewer is installed.

Financial Statement Report Setup

Enjoy !

Thursday, September 27, 2012

AX 2012 Performance

Tune data access settings

Client Performance Options

Is AX 2012 slower than AX 2009 ?

Collect AX 2012 event traces with Windows Performance Monitor

AX2012 List Pages - Performance Improvement

Tools for monitoring performance [AX 2012]

Plan guides (plan freezing) in SQL Server 2005/2008

Included columns in Dynamics AX 2012


Performance Resource Page for Microsoft Dynamics AX

Performance Monitoring

1- Monitoring performance by using the Query Store
2- Analyse SQL performance issues using SQL Query Store for D365FO
3- Retail Channel performance investigations

White Paper :

Introduction to Programming for Performance in Microsoft Dynamics 2012


Reorganize and Rebuild Indexes

Find the Index fragmentation on Sql Server 2005 / 2008

Database Maintenance Strategies for Dynamics AX

SQL Server Index Defragmentation (Updated)

Auto-Update STATISTICS :

SQL Server Trace Flag 2371 for Dynamics AX

Changes to automatic update statistics in SQL Server – traceflag 2371

Plan Database Storage :

Storage Top 10 Best Practices

Physical Database Storage Design

Performance Analyzer for Microsoft Dynamics :

Performance Analyzer Download

Performance Analyzer for Microsoft Dynamics

Determining Disk Latency with Performance Analyzer for Microsoft Dynamics

Performance Analyzer Reports

Capture Database Blocking with Performance Analyzer for Microsoft Dynamics

Blog Performance

Improving performance in the DynamicsPerf benchmark sample queries

DynamicsPerf Deep Dive – Baselines

Disk Benchmark :

ATTO Disk Benchmark

IOPS measurements

Calculate IOPS in a storage array

Interface decisions: sas, fc, or iscsi?

Wmarow Iops Calculator

Raid Calc

How to Measure Disk IOPS Using PowerShell

Virtual machines common premium storage performance

Configuration :

Top Tips for Maximizing the Performance Scalability of Dynamics AX 2009 systems on SQL Server 2008

Minor Changes in Database Configuration Checklist for Dynamics AX

AX 2012 - Server Configuration Performance Options Review

Configure SQL Server and storage settings [AX 2012]

SQL 2014 features: Partitioned indexes and memory-optimized tables

Performance Issues :

Do not assume, Benchmark your X++ code

Top 10 issues discovered from Dynamics AX Health Check

Top 10 issues discovered from Dynamics AX Code Review

SQL Server Customer Advisory Team

Collect Your SQL Server Auditing and Troubleshooting Information Automatically

AX Performance Troubleshooting Checklist Part 1A [Introduction and SQL Configuration]

Reporting Performance :

Microsoft Dynamics AX 2012 Reporting - tips how to improve performance

SQL Server Trace :

Technical Post – Microsoft SQL Server Trace Flag 4136

SQL Server Trace Flags for Dynamics AX

How to check for active trace flags on Microsoft SQL Server

Overcoming parameter sniffing issue in Microsoft Dynamics AX 2012-R2 – CU6

Dynamics AX and SQL Server Trace Flags, Quick and Dirty

SQL Server Deadlock :

SQL Server Deadlocks

Handling Deadlocks in SQL Server

Wednesday, September 26, 2012

AX 2012: Forms on opening hide behind in the back

In Dynamics AX 2012, when you open the forms, you might see some of them open behind the other forms. User may get the impression that the form was never opened. This happens if the form opened slowly......

Thursday, September 20, 2012

AX 2012 - Installing Feature pack on CU3


The link below contain useful informations on upgrade from AX 2012 CU2 to AX 2012 Feature Pack CU3.

Installing Feature pack on AX 2012 CU3

Enjoy !


Wednesday, September 19, 2012

AX 2012 - Identifying a user session in SQL Server


In previous versions of Microsoft Dynamics AX, the Online users form contained a column that provided a session process ID (SPID) for each client session. This column was useful for debugging blocked sessions. Specifically, the SPID column was used to find a user session that corresponded to a specific SPID. In Microsoft Dynamics AX 2012, the SPID column is no longer available in the Online users form.
In Microsoft Dynamics AX 2012, information about the user session can be included in the connection context for Microsoft SQL Server. because the inclusion of this information has a small effect on performance, the functionality is not turned on by default.
So, if you want to add again SPID column in the Online users form, you have to :
  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dynamics Server\6.0\01\Original (installed configuration)
    The Original (installed configuration) key is the key name for the current server configuration, if the configuration has not been changed from the default. If your system uses a configuration other than the configuration that was originally installed, locate the configuration that is currently active.
  3. Right-click the key, point to New, and then point to String value. Name the new value connectioncontext, and set the value to 1.
  4. Close the registry editor.
  5. Start the Services snap-in, and then restart the Application Object Server (AOS) service.

Find session information

  1. Open Microsoft SQL Server Management Studio.
  2. Run the following query to view all sessions that are related to Microsoft Dynamics AX:
    select cast(context_info as varchar(128)) as ci,* from sys.dm_exec_sessions where program_name like '%Dynamics%'
    The first two items in the ci (connection information) column are the Microsoft Dynamics AX user ID and the session ID.
  3. In the Online users form, you can now identify each session.

Troubleshooting database performance [AX 2012]

 Finding User Sessions from SPID in Dynamics AX 2012


Monday, September 3, 2012

Object Server xx: Internal Error occurred executing stored procedure when creating session for the AOS

Hi Guys

If during the AOS Service starter have the error "Object Server xx:  Internal Error occurred executing stored procedure when creating session for the AOS" means that the Store Procedure CREATESERVERSESSIONS and CREATEUSERSESSIONS are missing in the Database.

At this point you have two solutions :

1- Create the Store manually
2- Install again the AOS service

I prefer the second solution !

Enjoy !

Wednesday, August 22, 2012

Synchronize Database Problem - Missing Field in SQL Table


During Syncronize process could happen that for certain Tables the System table SqlDictionary present all columns, but the relative SQL Table have some fields missing.

The problem occur with the Check\Synchronize Action. Seems that AX update correctly the system table SQLDictionary, but don't create the new fields in the SQL Tables.

Due to solve the problem, run the Synchronize Database Action from the SQL Administration form. This action first update the system table SQLDictionary and finally create the fields in SQL Table if missing.
Seems that the Check\Synchronize Action, if a field is present in the system table SQLDictionary don't check if the same is present in the SQL Table !

See also Troubleshooting AOT Synchronization Errors

Enjoy !


Tuesday, August 21, 2012

AX 2012 - WCF Service Configuration Editor

View and modify the AOS Configuration : AX 2012 - Service Configuration Editor

AX 2012 - The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error

We run into issue that whenever we used a Microsoft Dynamics AX configuration file with a Reporting Services instance (as mentioned in here: the following error was reported the first time a report was run after the restart of the SQL Reporting Services instance:
"The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression)"
Running the report for the second time, it renders without any error. The error is mostly seen with subsequent instances of Reporting Services because only then an Microsoft Dynamics AX configuration file (Microsoft.Dynamics.AX.ReportConfiguration.axc) is used but any Reporting Services instance that is set up to use an AX configuration file will throw this error.

The resolution we found was to use "FullTrust" permission set in place of "Execute" for the "Report_Expressions_Default_Permissions" in the rssrvpolicy.config but maybe there is some other solution that I was not aware of.

AX 2012 - SSRS Report issues page

Wednesday, July 4, 2012

AX 2012 - Create a new AX User using SQL Server


If you want create a new AX User without using the AX Import, is enough manage the following SQL Tables :

- Popolate the USERINFO table
- Duplicate the records in the Table SECURITYUSERROLE link to the Admin user changing the User_ Column with the new userid.

Enjoy !

Monday, May 28, 2012

AX 2012 - Named user license counts

AX 2012 - AOD Upgrade


If during AOD Upgrade checklist don't appear the tasks related "Import AOD Files into the baseline model store and Import AOD files into the new model store" the reason is related the AX License.

You must have a valid developer license installed on the system to view the Code upgrade checklist.

Enjoy !

Tuesday, March 13, 2012

A table, Extended Data Type, Base Enum or class called ??? already exists. Import of Table aborted.


If during import with Xpo appear the Error in the Title you have to delete the AUC file, maybe it's corrupt.


Wednesday, February 22, 2012

AX 2009 EP - Sys.ArgumentNullException: Value cannot be null


If during click on a date picker appear this error :
 Sys.ArgumentNullException: Value cannot be null.
 Parameter name: panelsDeleting[0]

The reason is the Debug active !
You have to open the web.config file and search the line :

compilation batch=”false” debug=”true“

Replace with

compilation batch=”false” debug=”false“


AX 2012 - Demo Data

Friday, February 10, 2012

AX 2012 - Compile and CIL Generation errors when reporting extensions is not installed

When installing Microsoft Dynamics AX 2012 during Compile could be error in the classes :
- SysStartupCmdGenerateSsasProject
- BIGenerator
- BIAnalysisServicesProjectController

The problem is related Microsoft.Dynamics.AX.Framework.Analytics.DLL that is installed with Reporting Extensions.

For fix the problem we have to install SQL AMO, restart the Server and Compile again.

Compile and CIL Generation errors when reporting extensions is not installed

AX 2012 - FIX

Saturday, February 4, 2012

Tuesday, January 24, 2012

AX 2012 - Move Database Model Store to another Server with a different Active Directory


If you have to move the AX 2012 Database Model Store to another Server where change also Active Directory the steps are :

- Change SID of Administrator Account in the Table Userinfo
- Modify SSRS Report Configuration inside AX
- Setup the new Business Connector Proxy Account inside AX ( System Service Accounts )
- Setup the new URL of Help Server
- Delete form SYSSERVERSESSIONS table the record relative the previous AOS instance

After that you can install Report Services and Analysis Extension.

Enjoy !

AX 2012 - Deploy language-specific versions of a report

Sunday, January 22, 2012

Viewing SSRS Reports with SharePoint Web Parts

For Install the Web Parts  Sql Report Explorer and Sql Report Viewer  to SharePoint the command is :

STSADM.EXE -o addwppack -filename "C:\ Program Files\Microsoft SQL Server\100\Tools\Reporting Services\SharePoint\" -globalinstall

Viewing Reports with SharePoint 2.0 Web Parts

Monday, January 9, 2012

InfoLog : Check if a text already exists in a Infolog "Stack"

if you want to check if a text is already persent inside a Infolog "Stack" use this code :

For (currentLine = 1; currentLine <= infolog.line(); currentLine++)
       currentText += infolog.text(currentLine) + '\n' ;
If ( ! StrScan( currentText, infologText, 1, StrLen(currentText) ) )

Thursday, January 5, 2012

Show Global Assembly Cache (GAC) Folder in "details"

If you have to work with the GAC folder it's better to see all contents ( also folder GAC_MSIL, GAC_64, ect) so follow these :

type : “cd\windows\assembly”
type: “attrib -r -h -s desktop.ini”
type: “ren desktop.ini desktop.bak”

now open the GAC folder normally in your explorer.


AX 2009 - Enterprise Portal on 64 Bit and Deploy

Updating Enterprise Portal from Dynamics AX 2009 Client fails on a 64bit Microsoft Windows Server

AxUpdatePortal.exe does not update Enterprise Portal when not running from an elevated command prompt

If you have to work with the GAC folder it's better to see all contents ( also folder GAC_MSIL, GAC_64, ect) so follow these :

type : “cd\windows\assembly”
type: “attrib -r -h -s desktop.ini”
type: “ren desktop.ini desktop.bak”

now open the GAC folder normally in your explorer.