Other recent Dynamics AX Blog postings

Donnerstag, Dezember 08, 2005

Slow ZipCodeLookup

If you have lots of zipcodes in your Zipcode table, you will get the problem that when you click on the lookup button of your zipcode field and it happens that the content of the zipcode field is one of the last records in your table, you will have to wait and wait and wait...

Reason: in the form ZipCodeLookup, method "run", the standard system uses the function "findrecord". Findrecord will go through the table and compare each record with the one you search! This is the same as if you would go down the form clicking each record.

The sad thing is: there's not much you can do about it. The only thing I thound was to replace the findrecord method with a filter.

Advantage: the lookup will show up immediately.
Disadvantage: the lookup form will only show records that match the zipcode from the previous form. Here's what you have to change in the method:

if (zipCodeCurrent)
//zipCode_ds.findRecord(zipCodeCurrent); // Ori
// Replace original line above with next line
zipCode_ds.query().dataSourceTable(tableNum(ZipCode)).addRange(fieldNum(ZipCode, ZipCode)).value(zipcodecurrent.ZipCode+".."); zipCode_ds.executeQuery();

Give it a try! And tell me what you think about it!

Mittwoch, Dezember 07, 2005

Axapta 3.0 and SQL 2005

To one of the earlier posts, Bernard added a comment which I will put here, as it contains very good information about the topic:

Microsoft is currently planning to make a kernel change to Microsoft Axapta 3.0 SP4, so that the solution will be able to support the Microsoft SQL Server 2005 database. We expect that the kernel change will be available through a General Distribution Release (GDR) in January 2006. Please see the timeline below for details on Microsoft SQL Server 2005 support.

  • January 2006: GDR release is planned to provide Microsoft SQL Server 2005 support for Microsoft Axapta 3.0 SP4. Microsoft Axapta 3.0 SP4 is not expected to support the new SQL Reporting Services and Report Builder

  • March 2006: Planned release for Microsoft Axapta 3.0 SP5, with support for Microsoft SQL Server 2005. Microsoft Axapta 3.0 SP5 is not expected to support the new SQL Reporting Services and Report Builder

  • June 2006: Planned release for Microsoft Dynamics AX in initial regions. Microsoft Dynamics AX is expected to support the Microsoft SQL Server 2005 database and SQL Reporting Services, including Report Builder

More information on the GDR kernel change will be announced as the release date draws closer.Microsoft Dynamics AX and SQL Server 2005 Aligned to Deliver Next Generation of Integrated Business Solutions

Integration with Microsoft SQL Server 2005 is key to delivering adaptable business solutions. Microsoft Dynamics AX, the next release of Microsoft Axapta, is being designed to take advantage of the business intelligence, data management, enhanced performance and high availability features of Microsoft SQL Server 2005.

Donnerstag, November 24, 2005

Some facts about AOS clusters

For your information:

  • When you have a SQL cluster for failover and the actual failover happens, the AOS will lose the connection to the SQL server and you have to restart the AOS service.

  • When you have an AOS cluster and you set it to start "On demand", it will not work. If the AOS instances are not running they will never start when clients try to connect. Sad but true. Maybe this will change when we get the new Dynamics Ax 4.0.

Mittwoch, November 23, 2005

Where Breakpoints are stored for Axapta

If you ever wondered where Axapta stores the breakpoints, here is the answer:
breakpoints are stored in the registry under the key


Here's a screenshot:

Mittwoch, November 16, 2005

AOS Cluster on one server

Although the time might be near that we do not see the AOS clusters as they are now anymore(4.0 is coming!), here are a few words about clustering AOS in Axapta 3.0:

Normally, you use quite a good server for the AOS, let's say a dual Xeon with 3Ghz. That is, of course, way too much to ever be used by the AOS. So, what can you do ?
--> Just make a second AOS instance on the same machine! Put both instances into the same AOS cluster et voila!

Why does that make sense, you might ask. Well, one AOS instance (which means one ax32serv.exe) can only address 2GB of memory. That will be reached sooner than you think! Starting at around 150-180 users you will get dangerously near the 2GB. If you put 2 AOS instances on the machine, both of them can take about 150 users, that makes 300 users total.

If you have more users, you must add a second server (which you already have, of course).

Donnerstag, November 03, 2005

SQL Server 2005 released!

The SQL Server 2005 is already available for download. If you have an MSDN subscription, you will find all the versions there (Developer, Enterprise, Standard, Workgroup).

Freitag, Oktober 21, 2005

Release Date of SQL Server 2005

Just in case you didn't know already:
the international release date of Microsoft SQL Server 2005 is November 7th (2005).

Here in Austria (where I live), the release date is November 22nd (2005) and it will be released together with Microsoft Visual Studio .NET 2005.

Unfortunately, I still do not know whether Axapta 3.0 will get a SQL 2005 connection or not..........

Montag, Oktober 17, 2005

The mystery of "index" vs. "index hint"

In the Axapta community, there is still a big confusion about the "index" and "index hint" statements used in connection with selects.

So, what is the Axapta kernel *really* doing:

Using "index": when you add the statement "index MyIndex", the Axapta kernel will add an "ORDER BY" with all the fields of the index.

Example: select * from InventTable index GroupItemIdx will generate the following SQL statement to the database:


The Index ItemGroupIdx of the InventTable exactly contains the two fields ItemGroupID and ItemId (in that order). Using "index", you still give the control of which index to use to the database optimizer. So, if the optimizer finds a better index to use, it will use it.

Using "index hint": when you add the statement "index hint MyIndex", the Axapta kernel will add a statement to instruct the database to use that index and no other one.

Example: select * from InventTable index hint GroupItemIdx will generate the following SQL statement to the database:


Using "index hint", you take away the control of which index to use from the database optimizer. So, if there may be a better index, the database will not use it.


Adding the "index" statement to an Axapta select, it does NOT mean that this index will be used by the database. What it DOES mean is that Axapta will send an "order by" to the database.

Adding the "index hint" statement to an Axapta select, it DOES mean that this index will be used by the database (and no other one).

This rule applies to both the MSSQL and Oracle databases.

Tip: On the Axapta 3.0 installation CD, you will find a document called "Performance enhancements using the Cost-Based optimizer" (file name: AX-300-TIP-024-v01.00-ENUS.doc) that will tell you some more things about Axapta and database optimizers.

Mittwoch, September 28, 2005

Axapta 4.0 Powerpoint

Here is a powerpoint file where you can get some ideas of what will be new in Axapta 4.0, or Microsoft Dynamics AX 4.0.

Click on the link and then on the powerpoint file. Unfortunately, Geocities doesn't let me put the direct link on the file here ?!?!?


Freitag, September 16, 2005

Axapta Blog now Microsoft related community

Today, the Axapta Blog site which you are reading now has been recognized as Microsoft related community.
From now on, it is listed here: http://www.microsoft.com/../../RelatedCommunitiesLanding.mspx

From time to time, it will also become a featured/highlighted community.

Mittwoch, September 07, 2005

Microsoft Axapta becomes Microsoft Dynamics AX

There were some rumours around the last days that Microsoft will change the name of it's ERP products and today I found the first info about the new name.

Microsoft will name every of their ERP products Microsoft Dynamics (followed by a short abbreviation of the "real"product, like AX for Axapta, GP for Great Plains.

So, get yourself acquainted to

Microsoft Dynamics AX

(BTW: the first info I found was from http://blogs.msdn.com/satyanadella/)

Freitag, August 19, 2005

Tip: How to renumber your RecId's

Every record in Axapta will have one unique identifier: the RecId.
The RecId will be unique per company and the system gets the next RecId number from the table SYSTEMSEQUENCES, field "NEXTVAL".
Sometimes Axapta also does not only take one number but will take more (I remember to have read that it can be up to 24 numbers)
The field is a signed integer in the database, so it can happen that you will swap from positive RecId's to negative RecId's. The range in which recid's are allocated is between 2.147.nnn.nnn and -2.147.nnn.nnn.
If you have "holes" in your RecId, it may then be interesting to renumber all RecId's, starting with the number 1 again. You can do this by running the script "Check Record Ids" in the menu Administration/Periodic/SQL Administration.
What will the script do?
--> It will create some new tables on the SQL database, collect all RecId numbers, assign new RecID number starting from one.
It will then check all Axapta tables if there are fields that are a reference to a RecId. If yes, the old RecId Reference will be replaced by the new one.
And here is also a very important trap: you must be sure that all your database fields that are a referenced RecID are extended from any type of RecId datatype.

The script itself will run quite fast. I was once using it on a 2.5 Axapta database with about 2GB of data and it was finished after about 1 hour.

Dienstag, August 09, 2005

Error: Form adjustments are gone after restarting AOS

You may have problems losing the users' form adjustments after the AOS has been restarted. Here is what I found out in an AOS cluster setup:

2 different PC running the AOS service (Axapta 3.0SP3)
One of them hosts the SQL Server
Application files: on a third PC (Axapta 3.0SP3)

Both AOS instances point to the same database, the same application and are in the same AOS cluster.

For better understanding, client running on AOS 1 will be marked red in this blog.
For better understanding, client running on AOS 2 will be marked green in this blog.

Now, start Client pointing to AOS1, go to User/Options and delete all usage data.
Restart both AOS instances.
Now, we should have a pretty clean installation with no usage data.

Start client pointing to AOS1.
After that start client pointing to AOS2.

On Client AOS1, open the inventory form.

Original inventory form:

Make the Item name field smaller and the search name bigger.
After that the inventory form should look something like this:

Close the inventory form on client AOS1.
Open the inventory form on client AOS2.
The inventory form on client AOS2 still looks the same as the original, the changes done on AOS1 are not visible.
Close the inventory form on client AOS2.

Close application on client AOS1.
Close application on client AOS2.

Stop AOS instance on AOS1.
Stop AOS instance on AOS2.
Start AOS instance on AOS1.
Start AOS instance on AOS2.

Start the client AOS1.
Open the inventory form.
And here is how it looks like:
=looks like standard form

CHANGES ARE GONE !!!!!!!!!!!!!

Donnerstag, August 04, 2005

Axapta 3.0 and SQL2005

I was asking Microsoft if there will be a version of Axapta 3.0 that will work with SQL 2005.
Here is what I got today as answer:

"Right now what I can tell you is that Axapta 4.0 will run with MS SQL Server 2005.

We can not confirm that Axapta 3.0 will work with MS SQL Server 2005 at this point in time.

Technically it is possible to set up MS SQL Server 2005 so it operates like MS SQL Server 2000 in theory this makes it possible to use Axapta 3.0 with this database but we would need to make the tests necessary internally before we officially can make any confirmations."

What makes me curious about it is: SQL 2005 will be released in autumn 2005 (october?), Axapta 4.0 will be released in Q2/2006 (meaning July 2006).
So, there will be a time period of 6-8 months where Microsoft will have to tell new Axapta customers that they cannot use SQL2005.
Just imagine a new Axapta customer that wants to start running Axapta March 1st, 2006. He will not be able to run Axapta with SQL2005.

Don't you also think that's kind of strange from the sales point of view?

Montag, August 01, 2005

New hardware sizing guide by Microsoft

My sources tell me that Microsoft has released a document called "Axapta Hardware Guide For Environments Less Then 100 Users".

It's a word doc and will give you recommendations for

  • Axapta Database Server
  • Axapta Object Server (AOS)
  • Axapta Application Server
  • Axapta Enterprise Portal Server
  • Axapta Batch Server
  • Storage
concerning CPU's, memory, network, RAID system.
You should ask your Axapta partner for a copy of the document.

If you will have more that 100 users, you must enter some data in an Excel sheet which will then be processed by Microsoft (ask your Axapta partner).

Today, I also found in Harish Mohanbabu's Blog something about sizing. Check if out here: http://www.livejournal.com/~harish_m/

Donnerstag, Juli 28, 2005

Tip: How to find out where that error message comes from

Have you ever got an error or info message in Axapta saying "Cannot post...." and wanted to know where that error is coming from?
Here's a tip how to find out where the info message is thrown.

First, add a breakpoint in the Info class, method add:

After that, run the script that throws the error. As soon as the error message is thrown, the Axapta debugger will pop up:

At the lower part of the screenshot, you can see the call stack (if not, go to menu "View" and activate menu item "Call stack").
In the call stack, you can double-click on any line and the debugger will go back to it. Let's say we clock on the third line of the screenshot above. The debugger will take us to the Class TaxCov, method TaxLedgerCov:

You can see that the debugger put us exactly to the place where the error was thrown.

With the above method, it's pretty easy to find your way around the infos that Axapta gives you.

Mittwoch, Juli 27, 2005

ATTENTION: Be careful when upgrading to Axapta 3.0 SP4

When you upgrade your Axapta 3.0 SP1-3 to the latest Service Pack 4, make sure you import the Hotfix HF30SP4_011 first.
If you do not install it, the upgrade may run for an extremely long time (but: no data will be harmed).
You can get the hotfix from Partnerguide or your Axapta partner.

Dienstag, Juli 26, 2005

Axapta performance comparison Win 2003/2000

If you want to know whether it's better to run Axapta on Windows 2003 or Windows 2000, here is what Microsoft found out:


Montag, Juli 25, 2005

How to set-up COM+ for Axapta correctly

Ever wondered why your COM connection was working while you were logged on to the PC and not working without being logged on?
Here's a short guideline how to set-up your COM+ correctly:
  1. You have to be logged on to the PC as a Local Administrator. Create a service account under which the COM+ should be running, this account must be local administrator on the PC. Log on with that account.
  2. In Axapta Config Utility: an Axapta User must be entered (on General Tab). This user must of course have the necessary rights in Axapta.
  3. In Axapta Config Utility: if the User has a Password, the Password must be entered (on COM Tab).
  4. Now (and only now) the COM+ component may be registered --> Config Utility, Tab “Business Connector”, Button “Register”. Of course you have to use the "Register COM+" option and the right dll file.
  5. In the Control Panel/Administration/Component Services: go to the Axapta COM+ Component (should be located under “Component Services / Computer / Workstation / COM+ applications / Navision Axapta Business Connector”.Open up the properties for the Axapta COM Connector. Go to the Identity Tab.Here, by default, the option “Interactive User” is chosen.Change this to: This User. Enter the user id (+domain) and password of the user you have logged in the PC (which should be the same as in 1., so this must be the local administrator).
If these guidelines are followed, the COM+ Axapta Connector will run even if nobody is actually logged on the PC. But be cautious: the COM+ connector will use the default Axapta configuration for the domain user that you entered in the component service. If you do not follow the 6 rules above, your COM+ might still not work.

Donnerstag, Juli 14, 2005

Testing AOS Latency

Wanted to know how big your AOS latency really is?
On many Axapta pages you can read that you should not test it with the "ping" command but with Axapta's built-in feature to test the latency. And so it works:

Start the system monitoring window by double-clicking the symbol as in the screenshot below(it's where area where the green arrow is displayed while Axapta is doing something).

In the System monitoring window, you can test the Latency by clicking on the “Test” button. Do that a couple of times and measure the times.
In the system monitoring window, also a Pseudo-simulation of a certain bandwidth and/or latency can be tested.

Enter a bandwidth and latency time, click on “Set as current” and your system will simulate that it runs over a connection with those settings.

There is also a startup-parameter for simulating the remote connection.


to have a bandwidth of 8000 KBps (i.e. 64 kilo bit per sec)50 msecs latency 1 indicates that only data is penalized (not application objects)2 indicate include application object

Freitag, Juli 08, 2005

Data dictionary changes in 3-tier applications

If you have a 3-tier AOS application that is running on several AOS in a cluster, sometimes developing can be a pain.

Besides the old known trick of duplicating the menu items SysFlushAOD, SysFlushData and SysFlushDictionary and set the duplicates to run on server, here's another hint.

The AOS will know about each other's changes in the AOT in some minutes time. But this will not work if you make changes in the data dictionary.

Following example: in a table, you create a new index with several fields and synchronize it to the database.
After that, you enter Axapta on another AOS. What will you see in the index list for the table ?
--> The index you just created is called "UNKNOWN" (but has the fields inside).

What you have to do now is call the SysFlushDictionary menu item (the one that is running on server or even better both of them, but first the one running on server).
Et voilá. You will see the index in the AOT.

Mittwoch, Juli 06, 2005


Welcome to the Axapta Blog Site.

This blog will deal with things around Axapta as well as provide some sample programming projects.