Friday, June 25, 2010

Upgrade from AX3.0, AX4.0 to AX 2009

The steps below provide a high-level overview of the tasks that you must complete to upgrade from Microsoft Dynamics AX 3.0 to Microsoft Dynamics AX 2009.

Back up your existing database and application files.

Import two .xpo files from the installation media to assist with data upgrade.

UpgradeColumnList.xpo, for 32-bit to 64-bit RecId field conversion.


LeftJustified.xpo, for removing any trailing spaces from fields.


Note: To help improve performance, you can apply the LeftJustified.xpo on the database that you create in step 4 after you’ve used the Microsoft Dynamics AX DB Upgrade Preparation tool but before you start the Microsoft Dynamics AX 2009 AOS.


(Optional) To help improve performance, remove all user data and logs of Microsoft Dynamics AX 3.0. For example, clean up the SysDatabaseLog table.


Create an empty database for Microsoft Dynamics AX 2009 in SQL Server 2005.


(Optional) To help improve performance, set initial data and log file sizes so that they don’t increase while you perform the data upgrade process.


(Optional) To help improve performance, set the recovery model to Simple for the Microsoft Dynamics AX 2009 Database.


Run AXDBUpgrade.exe (The Microsoft Dynamics AX DB Upgrade Preparation tool). Note: To help improve performance, you can run this tool in Multithreaded mode. For example, to run this tool in 10 threads, enter AxDbUpgrade.exe P/10 at a command prompt.


(Optional) Apply the LeftJustify file imported in step 2 to the Microsoft Dynamics AX 2009 database created in step 4.


Back up your Microsoft Dynamics AX database. Your database is ready to be upgraded.
Run the Microsoft Dynamics AX 2009 Setup file from the installation media. During installation, select the database that you created in step 4.


Copy your upgraded customized file into the correct application directory.


Start the AOS.


Start the Microsoft Dynamics AX 2009 client. The Upgrade checklist is displayed automatically.


Complete the steps in the Upgrade checklist to finish upgrading.


The steps below provide a high-level overview of the tasks that you must complete to upgrade from Microsoft Dynamics AX 4.0 to Microsoft Dynamics AX 2009.


Back up your existing database and application files (AX 4.0 database and (*.aod, *.ahd, *.ald, *.add, *.khd files from Dynamics AX 4.0\Application\Appl folder; copy these files from configuration that you wants to be upgrade).

Before you upgrade, you must execute the following SQL script on your AX 4.0 database: 

--DIMENSIONCOLLECTION



UPDATE SQLDICTIONARY SET FIELDID=1 WHERE FIELDID=50002 AND TABLEID=2897;


UPDATE SQLDICTIONARY SET FIELDID=2 WHERE FIELDID=50005 AND TABLEID=2897;


UPDATE SQLDICTIONARY SET FIELDID=3 WHERE FIELDID=50007 AND TABLEID=2897;


UPDATE SQLDICTIONARY SET FIELDID=4 WHERE FIELDID=50008 AND TABLEID=2897;


--DIMENSIONHIERARCHYCOMBINATION


UPDATE SQLDICTIONARY SET FIELDID=1 WHERE FIELDID=50002 AND TABLEID=2898;


UPDATE SQLDICTIONARY SET FIELDID=2 WHERE FIELDID=50003 AND TABLEID=2898;


UPDATE SQLDICTIONARY SET FIELDID=3 WHERE FIELDID=50005 AND TABLEID=2898;


UPDATE SQLDICTIONARY SET FIELDID=4 WHERE FIELDID=50006 AND TABLEID=2898;


UPDATE SQLDICTIONARY SET FIELDID=5 WHERE FIELDID=50009 AND TABLEID=2898;


--DIMENSIONSETCOMBINATIONDUP2899


UPDATE SQLDICTIONARY SET FIELDID=1 WHERE FIELDID=50001 AND TABLEID=2899;


UPDATE SQLDICTIONARY SET FIELDID=2 WHERE FIELDID=50002 AND TABLEID=2899;


UPDATE SQLDICTIONARY SET FIELDID=3 WHERE FIELDID=50003 AND TABLEID=2899;


--DIMENSIONSETCOMBINATIONTEMP


UPDATE SQLDICTIONARY SET FIELDID=1 WHERE FIELDID=50001 AND TABLEID=2900;


UPDATE SQLDICTIONARY SET FIELDID=2 WHERE FIELDID=50002 AND TABLEID=2900;


UPDATE SQLDICTIONARY SET FIELDID=3 WHERE FIELDID=50003 AND TABLEID=2900;


UPDATE SQLDICTIONARY SET FIELDID=4 WHERE FIELDID=50004 AND TABLEID=2900;


UPDATE SQLDICTIONARY SET FIELDID=5 WHERE FIELDID=50005 AND TABLEID=2900;


UPDATE SQLDICTIONARY SET FIELDID=6 WHERE FIELDID=50006 AND TABLEID=2900;


--PROVISIONALHIERARCHY


UPDATE SQLDICTIONARY SET FIELDID=1 WHERE FIELDID=50001 AND TABLEID=2901;


UPDATE SQLDICTIONARY SET FIELDID=2 WHERE FIELDID=50002 AND TABLEID=2901;


UPDATE SQLDICTIONARY SET FIELDID=3 WHERE FIELDID=50007 AND TABLEID=2901; 



Run the Microsoft Dynamics AX 2009 Setup file from the installation media. During installation, select your existing Microsoft Dynamics AX database (don't start AOS service)

Go to AX instance location that you installed in last step, normally this location is in \Microsoft Dynamics\5.0\Application\Appl\ folder, create new folder named 'Old' and copy SYS and GLS (*.aod, *.ahd, *.ald, *.add, *.khd) files from AX 4.0 backup to this Old folder.

Back to the location \Microsoft Dynamics\5.0\Application\Appl\ and paste all AX 4.0 application files (*.aod, *.ahd, *.ald, *.add, *.khd ) from all layers above the LOS layer ( BUS, VAR, CUS, USR, and respective patch layers) to this location. Delete index file (axapd.aoi - if found) from this directory.


Start the Microsoft Dynamics AX 2009 client. The Upgrade checklist is displayed automatically.


Complete the steps in the Upgrade checklist to finish upgrading.

Tuesday, June 22, 2010

close* methods on a form

There are “only” 5 ways to close a form:
1. Close - close the form
2. CloseOK – close the form, and set the OK flag – called by the commandbutton: Ok
3. CloseCancel – close the form, and set the Cancel flag – called by the commandbutton: Cancel
4. CloseSelectRecord – close the lookup form, and set return record
5. CloseSelect – close the lookup form, and set return value

The methods in past-tense are used to determine if or how a form was closed:
6. Closed – The form is no longer open
7. ClosedOK – The form was closed by the user clicking ‘OK’
8. ClosedCancel – The form was closed by the user clicking ‘Cancel’

And canClose() is called before any of the close methods get called.

Monday, June 7, 2010

The New Dynamics AX 2011 X++ Editor

New features have already been added to the next version of Dynamics AX, Microsoft Dynamics AX 2011.
Some of the new features include:

1. Ability to see lines in code
2.Improved IntelliSense features (all possibilities will appear once you type)
3.Great ability to select words in editor without selecting the line from the beginning
4.More colors
5.Ability to check Labels value without going to the Label Editor
6... and many more.