Monthly Archives: September 2013

Division of Modules in Microsoft Dynamics AX 2012

A few modules in the Microsoft Dynamics AX 2009 have been divided into sub-modules in Microsoft Dynamics AX 2012. The modules in Microsoft Dynamics AX 2009 and their division into the sub-modules in Microsoft Dynamics AX 2012 are listed below:

AX 2009 Module AX 2012 Module
Bank Cash and Bank Management
Accounts Payable Accounts Payable

Procurement and Sourcing


Accounts receivable Accounts receivable

Sales and Marketing


General Ledger General Ledger

Fixed Assets


Inventory Management Product Information

Inventory and Warehouse management


Production Production Control


Expense Management Travel and Expense management


Project Project management and Accounting

Compliance and Internal Control



Microsoft Dynamics AX Architecture

Microsoft Dynamics is a unique and powerful solution which contains efficient and flexible functional and development features. The Microsoft Dynamics is a three tier Architecture.

The three tier architecture is defined as:
Database: For the purpose of storing data
Server: Responsible for running the application business logic
Client: Allows user to access data from the database and run the business logic on the server

If we map this three tier architecture onto Microsoft AX, the components can be defined as:
Database (SQL Server Database): Microsoft Dynamics AX application uses data and data model stored in the SQL Server Database.
Server (Application Object Server –AOS): The AOS runs the business logic of the application.
Client (User Interface): The end user accesses the application through the user Interface which is the Microsoft Dynamics rich client or Enterprise Portal

Mircosoft Dynamics AX three-tier Architecture

SQL Server Databases:
Microsoft Dynamics AX Database: The Database is an online transaction processing database which stores the business data, metadata and the application code in tables and models.
Business Intelligence Database: SSRS and SSAS Databases are involved

Application Object Server:
As mentioned above, the AOS executes the business logic and perform many other tasks such as running X++ Job, managing sessions and enforcing security etc.

Microsoft Dynamics AX Client: It is the primary client which is used to access the functionality of the application. It is developed in the MorphX environment and it is a rich client.
Enterprise Portal: Part of the application that is displayed and accessed through a web browser


Some of the other components which are an essential part of the Microsoft Dynamics AX architecture are:
• Internet Information Server
• Microsoft Office
• The .NET Business Connector
• SharePoint
• Help Server
• Web Services

I hope this post helped you in getting a basic understanding of the architecture of Microsoft Dynamics AX. Keep visiting the blog to get more information about Microsoft Dynamics AX functionality and its development environment.

The SysOperation Framework Overview

Previously, the Runbase framework was being used to add the functionality that required batch processing. The Runbase framework has been replaced by the SysOperation framework, formerly known as Business Operation Framework. The Sysoperation framework creates a user interface which can be integrated with the batch server for batch processing.
The SysOperation framework can be used to implement operations that can scale to multiple processors by batch processing. It can also be implemented to prompt the user for an input. The batch processing feature can be used to control the time and duration of the operations which require more processing time. The framework also has support for queries, routing tasks and pack and unpack for parameter serialization.
The SysOperation framework basically enhances the performance of operations by explicitly scheduling their execution. Through the framework, the operations can be executed on user interaction or by scheduling them through the batch server.

The framework is an implementation of the MVC design pattern. The structure of the framework is defined below:

• Members
• Pack/UnPack
• Data contract

• Dialog

• Process
• User Prompt
• Run


This post was a short introduction to the SysOperation Framework. I will be writing about the comparison of Runbase framework and SysOperation framework in my next post. Tune in again to the blog for more info regarding the SysOperation framework.

Troubleshooting Error: CIL Generation;The given key was not present in the dictionary

While working, I encountered this error. The error is mentioned in the image below:

CIL Generator Found Errors and Could not save the assembly

And the compilation log had the following error:

The given key was not present in the dictionary

I was able to solve the error by carrying out the outlined steps:
1.Restart AOS Service
2.Generate Full CIL
In case, you do not have enough time for the Full compilation, go the error log and recompile the objects mentioned in the error message.

Creating a Customer Form at Run Time in X++

The job “CustomerForm” creates a customer form at run time in x++. In the form, I have used two datasources “CustTable” and “DirPartyTable”. I have also shown how to add menuitemfunctions in a form through X++.

Here is the code in X++:

public static void CustomerForm(Args _args)
DictTable dictTable;
DictTable dictTable1;
Form form;
FormBuildDesign design;
FormBuildDataSource formBuildDataSource;
FormBuildDataSource formBuildDataSource1;
FormBuildActionPaneControl actionPane;
FormBuildActionPaneTabControl actionPaneTab;
FormBuildButtonGroupControl buttonGroup1;
FormBuildButtonGroupControl buttonGroup2;
FormBuildCommandButtonControl CommandNew;
FormBuildCommandButtonControl CommandDelete;
FormBuildMenuButtonControl CustomerButton;
FormBuildFunctionButtonControl NewCustomerButton;
FormBuildFunctionButtonControl ForecastButton;
FormBuildGroupControl Grp;
FormBuildGridControl grid;
FormBuildGroupControl grpBody;
Args args;
FormRun formRun;

//Adding DataSources
dictTable1 = new DictTable(tableNum(CustTable));
dictTable = new DictTable(tableNum(DirPartyTable));
form = new Form();“Customer Overview”);

formBuildDataSource = form.addDataSource(;

formBuildDataSource1 = form.addDataSource(;
//Building Form Design
design = form.addDesign(‘Design’);
//Adding Action Pane and Buttons
actionPane = design.addControl(
FormControlType::ActionPane, ‘ActionPane’);;
actionPaneTab = actionPane.addControl(FormControlType::ActionPaneTab, ‘ActionPaneTab’);

buttonGroup1 = actionPaneTab.addControl(FormControlType::ButtonGroup, ‘NewDeleteGroup’);
buttonGroup2 = actionPaneTab.addControl(FormControlType::ButtonGroup, ‘ButtonGroup’);

CommandNew = buttonGroup1.addControl(FormControlType::CommandButton, ‘NewButton’);

CommandDelete = buttonGroup1.addControl(FormControlType::CommandButton, ‘NewButton’);

CustomerButton = buttonGroup2.addControl(FormControlType::MenuButton, ‘CustomerquickCreate’);
CustomerButton.helpText(“Create New Customer”);

NewCustomerButton = CustomerButton.addControl(FormControlType::MenuFunctionButton, ‘CustomerquickCreate’);
ForecastButton = buttonGroup2.addControl(FormControlType::MenuFunctionButton, ‘SalesForecast’);
grpBody = design.addControl(FormControlType::Group, ‘Body’);

grid = grpBody.addControl(FormControlType::Grid, “Grid”);
grid.addDataField(, fieldNum(DirPartyTable,Name));
grid.addDataField(, fieldNum(CustTable,AccountNum));
grid.addDataField(, fieldNum(DirPartyTable,LanguageId));

Grp = design.addControl(FormControlType::Group, ‘Group’);

ForecastButton = Grp.addControl(FormControlType::MenuFunctionButton, ‘SalesForecast’);

args = new Args();

formRun = classFactory.formRunClass(args);

Troubleshooting Error: Cannot open database requested by the login.

Here is one of the errors I encountered while I was working in Dynamics AX 2012. The complete error message is:

Cannot open database requested by the login. The login failed.Login failed for user ‘NT AUTHORITYNETWORK SERVICE’.

This error normally occurs when the application has been configured with the IIS and IIS does not have proper credentials to access SQL.

Here is a quick solution to solve this error. Open SQL Server Management Studio and go to the Security->Logins and right click on NT AUTHORITYNETWORK SERVICE.Right click on it and select Properties. A new screen will appear. Go to “User Mapping” and select your desired database. In the Database role memberships, tick the “db_owner” checkbox. Click Ok and restart your AX service.