Thursday, November 18, 2010

Sunday, October 24, 2010

Query and Reset a Terminal Server Remote Session

If you want to know which users are connect to a specific Server you can use the command :

qwinsta /server:IP_SERVER

If you want to disconnect a specific user you can use the command :

rwinsta /server:IP_SERVER SESSION_ID

Tuesday, October 19, 2010

Manage SelectCtrl on Dialog Class

If you want manage the interaction with a Dialog form by a User you have to Insert this line in the Dialog Method of the Class before "Return" command.


Monday, October 18, 2010

Change SID on Windows 7 and Windows Server 2008 R2 using sysprep

How to run a Dynamics AX Hyper-V on Virtual PC

"Duplicate" a Hyper-V Virtual Macchine :


Convert VHD from Hyper-V to Virtual PC :

Many site said it's impossible to convert an Hyper-V VHD based image to Virtual PC 2007 format, I found a way to do it, basically you need to remove integration services before copy vhd, then replace hal.dll.

1) Before copy VHD file, REMOVE Hyper-V Integration Services
2) Stop the Virtual Machine and copy the VHD file (let's call VirtualMachine1.vhd)
3) Start another virtual machine inside Virtual PC with same OS and use as a Secondary Disk the previous copied file (VirtualMachine1.vhd)
4) Using Windows Explorer from the previous started virtual machine open the Secondary Disk (let's suppose it's recognized as E:)
5) Replace hal.dll from the secondary disk (E:\WINDOWS\system32\HAL.DLL) using the file present into C: Partition.
6) Don't install ACPI drivers

More details about HAL.DLL file on:

Wednesday, October 6, 2010

Dynamics AX 2009 : Troubleshoot Role Center Reporting Errors

Learn how to troubleshoot Role Center report errors. This video shows you how to find the related report and investigate an SSRS/SSAS report using Visual Studio, how to check the query in SQL Server Management Studio, and how to find the related code inside Microsoft Dynamics AX 2009.

Global Address Book White Paper for Microsoft Dynamics AX 2009

This paper provides information about sharing party records in the global address book across companies and within companies in Microsoft Dynamics AX 2009.

Monday, September 27, 2010

SharePoint 2010 Preliminary System Requirements

System requirements for SharePoint Server 2010:

1.SharePoint Server 2010 will be 64-bit only.
2.SharePoint Server 2010 will require 64-bit Windows Server 2008 or 64-bit Windows Server 2008 R2.
3.SharePoint Server 2010 will require 64-bit SQL Server 2008 or 64-bit SQL Server 2005.

Wednesday, September 15, 2010

Sharepoint : when you specify configuration database settings on the Set Configuration Database Server page of SharePoint Central Admin

SharePoint, Failed to start the database service MSSQL$OfficeServers

Go to “regedit”, browse thru “HKLM_Local_Machine/Software/Microsoft/Shared Tools/Web Server Extensions/12.0/WSS/”.
Then change the value of attribute named “ServerRole” from SINGLESERVER to APPLICATION.

Monday, August 30, 2010

Change Font Infolog Message

If you want to change font or other properties to Infolog message Windows you have to modify the class Info method viewRefresh.

Tuesday, August 17, 2010

Impact Analysis feature for Dynamics AX 2009 (IAT - Upgrade Tool)

Patch Impact analysis, is the process of understanding a change that is being introduced into a system, determining the consequences of the change on related subsystems, and creating possible mitigation plans to reduce risk.

Google Maps Query String Parameters

Friday, July 2, 2010

Overwrite System Field in a Table

The code below work ony at Server Side !

Static Server void Run()
    CustTable   custTable;


    new OverwriteSystemFieldsPermission().assert();

    custTable.AccountNum = "TEST";
    custTable.(fieldNum(custTable, CreatedDateTime)) = DateTimeUtil::newDateTime(01\11\2013,0);

Enjoy !

Tuesday, June 29, 2010

How to: Register a Service Principal Name (SPN) for a Report Server - NTLM authentication - Kerberos

When Kerberos authentication is required

Kerberos is a network authentication protocol that allows Windows integrated authentication to occur across multiple computers (a client and multiple servers). NTLM authentication is an alternative to Kerberos authentication, and it is based on a challenge-response mechanism between a client and a server. NTLM authentication is easier to configure than Kerberos; however, it supports the flow of credentials between just two computers (a client and one server).
Kerberos authentication must be used in Microsoft Dynamics AX environments where: Enterprise Portal is installed on a server other than the server running Reporting Services and/or Analysis Services.
The Reporting Services database exists on a server other than the server running the Reporting Services Windows service.
If you do not configure Kerberos authentication, users will not be able to view Reporting Services reports and/or Analysis Services reports in Role Center pages.

Thursday, June 3, 2010

DataSource Query

The query object link to a DataSource have two "versions" :

1- DataSourceName.Query()... is related to the original Query
2- DataSourceName.QueryRun().Query()... is related to the LAST query, so with the range introduce by the user.

Monday, May 24, 2010

Datasource Refresh, reread, research, executeQuery - which one to use?

X++ developers seem to be having a lot of trouble with these 4 datasource methods, no matter how senior they are in AX.

Tuesday, May 11, 2010

Reboot Windows


Monday, May 10, 2010

SysAutoRun execRun Method


Refresh All Datasource inside a form

Counter i;
Common currentRecord;


For (i=1; i<=Element.dataSourceCount(); i++)
currentRecord = Element.dataSource(i).cursor().data();
// Don't lost the Filter or Range Condition

If the AX version is greater or equal AX 2009 the code become :

For (i=1; i<=Element.dataSourceCount(); i++)
currentRecord = Element.dataSource(i).cursor().data();
// Don't lost the Filter or Range Condition

Sunday, May 9, 2010

A Visual Studio add-in to edit SharePoint content from within Visual Studio

A Visual Studio add-in to give developers the ability to edit SharePoint content from within Visual Studio.

SharePoint - Data at the root level is invalid. Line 1 , Position 1

When you open a file with SharePoint Designer, it creates all kind of FrontPage Server Extension functionality in your web application. One thing it does it that it creates a _vti_cnf folder in every folder you have in your web application.
If you remove all these folders you fix your problem.

Customizing Master Pages in Windows SharePoint Services - SharePoint Designer

Thursday, May 6, 2010

AX 2009 Enterprise Portal Development Cookbook - EP Manual

You can download the cookbook (EP AX 2009 Manual) here:

Work with Text - copy to Clipboard

TextBuffer txtb = new TextBuffer();

txtb.fromFile("myfile.txt"); // Read text from file
txtb.toClipboard(); // Copy it to the clipboard


// Create a Text File...


Tuesday, May 4, 2010

Install SharePoint Server 2007 on Windows Server 2008 R2

Thursday, April 29, 2010

Web Debugging Proxy - Trace HTTP Traffic

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

Friday, April 23, 2010

Tuesday, April 20, 2010

White Papers and Resources for Microsoft Dynamics AX

Wednesday, March 24, 2010

XSLT or XML interest link

How to use XSLT in AIF and what’s wrong with empty xml Nodes!E82F2C8CB173C0A0!302.entry

he AIF framework is able to communicate with XML messages to the outer world. However there is a small limitation. The format of this XML message should sometimes be altered for this outside world. Microsoft BizTalk can be a solution, when messages are send to different parties and every party has his own XML layout, but when this message has to be send to just one party XSLT can help you out.

XSLT is a mechanism that can rebuild an XML message to a different format (XML to XML or XML to xHTML).

It is possible in AX to use XSLT (BASIC\SETUP\AIF\XSLT Repository. You can use these XSLT in the Endpoint Actions Pipeline Components. The XSLT in AX can only transform the body node of the XML message.

You can test the default AX XML and your XSLT in AX using form tutorial_XSL

Cannot resolve collation conflict for equal to operation

Monday, March 22, 2010

Default Cube Advisor Tool for Microsoft Dynamics AX 2009

Thursday, March 18, 2010

Integrating a Third Party Version Control System into Microsoft Dynamics AX 2009

Tuesday, March 16, 2010

All about Virtualization....

Wednesday, March 3, 2010

Error executing code: Insufficient memory to run script - AIF, Reverse Engineering Tool, ect

In Dynamics AX 4.0 or Dynamics AX 2009 it can happen that a lengthy operation terminates with the following error message in the InfoLog:

Error executing code: Insufficient memory to run script.
A typical example that can result in this error message is when you are running the Reverse Engineering Tool of Dynamics AX 4.0 SP1. Another very common situation is when you are trying to process very large AIF messages with several thousand lines within AX or within an application that uses the Business Connector like the AX BizTalk Adapter.

With Dynamics AX 4.0 a new mechanism was introduced to limit the maximum amount of memory that can be allocated by variables (in X++ code) in a session. This maximum amount is set to 10 MB by default. For some operations like large AIF messages (that are stored in memory during processing) this is however not enough and so the operation is terminated when the maximum amount is reached.

Thursday, February 25, 2010

Dynamics AX 2009 SP1

Wednesday, February 24, 2010

Setting up the TAPI interface in Axapta

Friday, February 19, 2010

Update/Activate the SQL Server Evaluation Version

Once you install evaluation edition of SQL Server 2008 and then perform in place upgrade to full version, you may get below error message when you open SQL Server Management Studio :

Evaluation Period has expired.....

How do you know when a SQL Server Evaluation expired

look to the folder :\Program Files\Microsoft SQL Server\100\Setup Bootstrap\LOG\ and check the creation date of the file Summary.txt

Wednesday, February 10, 2010

Resetting usage data / Favorites Link

Friday, January 29, 2010

Add new SharePoint Server to Existing Server Farm

Thursday, January 28, 2010

Statement of Direction (Roadmap) for Microsoft Dynamics AX{C543391C-739D-4B90-8E9C-5C9781A8510E}&NRORIGINALURL=/partnersource/marketing/statementofdirection/statementofdirection.htm?printpage=false&stext=ax%2520sod&NRCACHEHINT=Guest&printpage=false&stext=ax sod&wa=wsignin1.0

Wednesday, January 27, 2010

Microsoft Dynamics AX 2009 White Paper: Documentation Resources

Application Integration Framework (AIF) Overview

Tuesday, January 26, 2010

Read All Files inside a directory

void FindAllCSV()

Filename baseFolder;
Filename csvFilename;
Filename foundBaseFileName;
Filename foundFileName;
container mainFolder, subFolder, fileContainer;
boolean filesFoundMainFolder = true;
boolean filesFoundSubFolder = true;
int apiResult;

int setCurrentFolder (Filename _filename = '')
return WinAPI::setCurrentDirectory(_filename);

baseFolder = "C:\\TEST\\";

apiResult = setCurrentFolder(SysTreeNode::duplicatePathDelimiters(baseFolder));
mainFolder = WinAPI::findFirstFile("*.*");
foundBaseFileName = conpeek(mainFolder, 2);
while (filesFoundMainFolder)
if (foundBaseFileName != #currentFolder &&
foundBaseFileName != #upFolder &&
foundBaseFileName != '')
csvFilename = baseFolder + foundBaseFileName;

apiResult = setCurrentFolder(SysTreeNode::duplicatePathDelimiters(baseFolder));
foundBaseFileName = WinAPI::findNextFile(conpeek(mainFolder, 1));
filesFoundMainFolder = foundBaseFileName ? true : false;

Client/Server Performance

By default, Insert, Update and Delete methods on the Tables are always server bound, even though it is not stated in the definition of the method.
The methods cannot be forced to the client because any client modifier is simply ignored by the Dynamics AX application runtime.

Dynamics AX Report can be executed on either the client or the server. Exactly where to execute the report is defined by the menu item that open the report. If reports are executed on the server but displayed on the client, the individual pages are generated on the server and sent to the client. If a report is executed on the client, the client renders and generates the report pages.

Rich forms are always executed on the client, which results in client/server traffic when fetching and manipulating records. In addition, display methods can degrade form performance because the displayed methods are executed by the form application runtime whenever it refreshes the forms control displaying the value.
A server-bound display method could cause a substantial number of client/server calls, especially if the display methods is show in a grid in which the returned value from multiple display methods is shown at the same time. You can, however, cache the value from the display method by calling the CacheAddMethod method on the FormDataSource object..The form Application runtime then caches the returned values and refreshes them only when the record is modified or re-read.

Monday, January 25, 2010

Migration Tools for Microsoft Dynamics AX 4.0

Migration Tool for Microsoft Dynamics AX 2009

The Migration Tool for Microsoft Dynamics® AX 2009 helps migrating data from competing business management systems and legacy systems to Microsoft Dynamics® AX 2009.

By decreasing the time and expense of migrating the customer’s data, partners can increase the value of their services and gain a competitive advantage.

Monday, January 18, 2010

The date format in Microsoft Dynamics AX 4.0 Enterprise Portal site is not changed after you change displayed the date format of SharePoint sites

You change the displayed date format of the SharePoint sites in the Regional Settings Web page. However, the date format in Microsoft Dynamics AX 4.0 Enterprise Portal site is not changed. If you change the profile of the regional setting of the current user, the date format will not be changed either.

To change the date format, create and set a local interactive account for the Enterprise Portal (EP) user on the server that is running Internet Information Services (IIS) and then set the desired local regional setting. If you want to have a default regional setting for a user who does not have a local account, or does not have a user profile in IIS, change the system-wide setting of the server that is running IIS.

The underlying class that displays Web forms is the WebFormHtml class. The WebFormHtml class sends dates that are in the layoutDate() method. The layoutDate() method makes a call to the date2strUser(,,,) method to format the date. The date2strUser() method that is defined in "\Classes\Global\" is a wrapper around the date2Str() method.

In Enterprise Portal, date is formatted according to the regional settings that are defined in the server that is running IIS. When a user has a local profile in the server that is running IIS and a regional setting exists for this user, this local regional setting overrides the system-wide regional setting. By default, if the user does not have a user profile in the server that is running IIS, Enterprise Portal will use the system-wide regional settings of Windows Server 2003.

Friday, January 15, 2010

Patching White Paper for Microsoft Dynamics AX 4.0

Wednesday, January 13, 2010

Form Windows Resolution

WinApi::getSystemMetrics(1) o WinApi::getSystemMetrics(0)

Tuesday, January 12, 2010

Microsoft Dynamics AX 2009 Known Issues

Microsoft Dynamics AX 2009 Technical Library

Servicing Microsoft Dynamics AX 2009

Friday, January 8, 2010

Reperire il campo chiave di una Tabella

DictTable DictTable;

DictTable = New DictTable(TableNum(Nome_Tabella));
print fieldid2name(, dictTable.primaryKeyField());

Thursday, January 7, 2010

Form - Aggiunta campi dalla form UserSetup

Di default da impostazioni di una Form se si preme il tasto "Aggiunta Campi" AX permette di aggiungere SOLO i campi visualizzati nella form stessa.
Per poter aggiungere un campo non previsto, ma presente in tabella, bisogna a livello di proprietà del campo del Datasource andare a settare la proprietà "AllowAdd" a YES.

AX ASCII Functions

Converts a character in a string to the ASCII value of the character you have to use :

int char2Num(str text, int position)

Instead, converts an integer to the corresponding ASCII character you have to use :

str num2Char(int figure)

see also

Tuesday, January 5, 2010

SQL Server 2008 - Key-Range Locking