We shifted to our own domain name đ We have a brand new home. Link up with us there.Â
First Windows 8 App for Microsoft Dynamics AX 2012
7 OctMicrosoft Windows 8 App development team have been working really hard over the last weeks. As a result, they were able to launch three Microsoft Dynamics AX 2012 apps in the Windows store.
These Windows 8 apps have been designed to work with Dynamics AX 2012, however, right now they cannot be connected to a Dynamics AX system. The developers are working over this feature and are hopeful that they will bring some progress regarding this feature in the upcoming months.
The first app, released for the Dynamics AX 2012 is âApprovalâ. The app, basically, manages approvals with the Dynamics AX 2012 Approvals app in conjunction with Microsoft Dynamics AX 2012. The app user can view a list of the items which need review, view the recent actions taken, track the presence of the coworkers and get insights.
Division of Modules in Microsoft Dynamics AX 2012
25 SepA 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
17 SepMicrosoft 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
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.
Client:
⢠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
16 SepPreviously, 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:
Model:
⢠Members
⢠Pack/UnPack
⢠Data contract
View:
⢠Dialog
Controller:
⢠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
11 SepWhile working, I encountered this error. The error is mentioned in the image below:
And the compilation log had the following error:
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++
5 SepThe 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)
{
//Initialization
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;
#task
//Adding DataSources
dictTable1 = new DictTable(tableNum(CustTable));
dictTable = new DictTable(tableNum(DirPartyTable));
form = new Form();
form.name(“Customer Overview”);
formBuildDataSource = form.addDataSource(dictTable.name());
formBuildDataSource.table(dictTable.id());
formBuildDataSource1 = form.addDataSource(dictTable1.name());
formBuildDataSource1.table(dictTable1.id());
//Building Form Design
design = form.addDesign(‘Design’);
design.caption(“Overview”);
design.style(FormStyle::SimpleList);
design.titleDatasource(formBuildDataSource.id());
//Adding Action Pane and Buttons
actionPane = design.addControl(
FormControlType::ActionPane, ‘ActionPane’);
actionPane.style(ActionPaneStyle::Strip);
actionPaneTab = actionPane.addControl(FormControlType::ActionPaneTab, ‘ActionPaneTab’);
buttonGroup1 = actionPaneTab.addControl(FormControlType::ButtonGroup, ‘NewDeleteGroup’);
buttonGroup2 = actionPaneTab.addControl(FormControlType::ButtonGroup, ‘ButtonGroup’);
CommandNew = buttonGroup1.addControl(FormControlType::CommandButton, ‘NewButton’);
CommandNew.buttonDisplay(FormButtonDisplay::TextAndImageLeft);
CommandNew.normalImage(‘11045’);
CommandNew.imageLocation(SysImageLocation::EmbeddedResource);
CommandNew.primary(NoYes::Yes);
CommandNew.command(#taskNew);
CommandDelete = buttonGroup1.addControl(FormControlType::CommandButton, ‘NewButton’);
CommandDelete.text(“Delete”);
CommandDelete.buttonDisplay(FormButtonDisplay::TextAndImageLeft);
CommandDelete.normalImage(‘10121’);
CommandDelete.imageLocation(SysImageLocation::EmbeddedResource);
CommandDelete.saveRecord(NoYes::Yes);
CommandDelete.primary(NoYes::Yes);
CommandDelete.command(#taskDeleteRecord);
CustomerButton = buttonGroup2.addControl(FormControlType::MenuButton, ‘CustomerquickCreate’);
CustomerButton.helpText(“Create New Customer”);
CustomerButton.text(“Customer”);
NewCustomerButton = CustomerButton.addControl(FormControlType::MenuFunctionButton, ‘CustomerquickCreate’);
NewCustomerButton.text(‘New’);
NewCustomerButton.saveRecord(NoYes::No);
NewCustomerButton.dataSource(formBuildDataSource.id());
NewCustomerButton.menuItemName(menuitemDisplayStr(CustomerquickCreate));
ForecastButton = buttonGroup2.addControl(FormControlType::MenuFunctionButton, ‘SalesForecast’);
ForecastButton.text(‘Forecast’);
ForecastButton.saveRecord(NoYes::No);
ForecastButton.menuItemName(menuitemDisplayStr(ForecastSalesGroup));
//Body
grpBody = design.addControl(FormControlType::Group, ‘Body’);
grpBody.heightMode(FormHeight::ColumnHeight);
grpBody.columnspace(0);
grpBody.style(GroupStyle::BorderlessGridContainer);
grid = grpBody.addControl(FormControlType::Grid, “Grid”);
grid.dataSource(formBuildDataSource.name());
grid.widthMode(FormWidth::ColumnWidth);
grid.heightMode(FormHeight::ColumnHeight);
grid.addDataField(formBuildDataSource.id(), fieldNum(DirPartyTable,Name));
grid.addDataField(formBuildDataSource1.id(), fieldNum(CustTable,AccountNum));
grid.addDataField(formBuildDataSource.id(), fieldNum(DirPartyTable,LanguageId));
Grp = design.addControl(FormControlType::Group, ‘Group’);
ForecastButton = Grp.addControl(FormControlType::MenuFunctionButton, ‘SalesForecast’);
ForecastButton.text(‘Forecast’);
ForecastButton.menuItemName(menuitemDisplayStr(ForecastSalesGroup));
args = new Args();
args.object(form);
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
}
Troubleshooting Error: Cannot open database requested by the login.
5 SepHere 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 AUTHORITY\NETWORK 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 AUTHORITY\NETWORK 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.
Finding the occurrence of string within another string through X++
29 AugX++ offers a lot of string functions to be used on the strings. Here, we will be using the âstrscanâ function. The âstrscanâ searches for a string within another string
————————————————————————————————————-
The strscan function takes the following arguments
Strscan (str text, str characters, int position, int number);
Text: The target string
Characters: The string to be found
Position: The first position in the target string to perform the search
Number: Number of times search will be performed. Normally, it is the length of the original string. If a negative sign is used in this argument, the search operation is performed in the reverse order
————————————————————————————————————-
Below is the code to find any character in a string.
int position;
str targetstring = âABCDâ
position = strscan( targetstring, âCDâ,3,strlen(targetstring);
if (position)
{
info(âFoundâ);
}
else
{
info(âNot Foundâ);
}
Â
Developing Query Based Reports
29 AugFor production and operational reports that are crucial to an organization, a developer can use SSRS reports. There are three types of data sources available to be used for the development of the SSRS Reports
- Query
- RDP
- Business Logic
Here, we will be discussing about developing query based SSRS Reports. Before you can start developing query based reports, you need to create an AOT query on which your report will be based. Once you have created a query and added the required data sources, open a new project in Visual Studio. From the Project dialog, select âMicrosoft Dynamics AXâ from project types and âReport Modelâ from templates. Create the Project and open the solution explorer. Right click on your project and add a new report. Double click on the newly created report. You can see a number of items in your report now. Right click on the node âDatasetsâ and add a new Dataset. In the properties of the newly created dataset, name your Dataset, set data source type to âqueryâ and select the query you made earlier in AX by clicking on the ellipse button appearing in the Query Property. You can select all fields or only the desired fields of the AX query for reporting purposes.
After you have configured the dataset, add a report design. There are two types of report designs; Auto design and precision design. Always prefer auto design unless you need to customize your report. For the sake of simplicity, we select the Autodesign here.
Right click on the design node and add âAutodesignâ. It is recommended to set the name of the report to either to âReportâ or âDesignâ. Drag your data set on the newly created design node. The report is now ready to be executed. You can open your report through three options.
- Preview in Visual Studio
- Open from Dynamics AX using output action menu
- From browser by opening the URL : http://localhost/reports
I hope this post helped you. I will be writing about RDP and business logic based reports in my next posts. I will also be writing about precision design based reports which allow you to customize the design of your reports.



