Wednesday, March 26, 2008

Hard-coded reformatting of Netherlands postal codes

My company discovered recently that Dynamics AX 4.0 is coded to reformat the Netherlands postal codes when setting the address field. Because this code is implemented on the AddressMap object, it affects anything that uses addresses (customers, vendors, sales orders, warehouses, etc.)

The postal codes for the Netherlands consist of 4 number and 2 letters, separated by a space. Many other countries also have a space in their postal codes, like Canada and Great Brittan.

Postal code City Country
2252 GN Voorschoten NL
V5K 1C6 Vancouver CA
E11 3RU London GB

For most postal codes in Dynamics AX, the way the it is entered in the database is the way it appears in the formatted address field on forms and reports. If you want a space in your postal code, then make sure it is entered that way in the AddressZipCode table. What I discovered, though, is that there is a hard-coded exception for the Netherlands.

When the FormatAddress or SetAddress methods of the AddressMap object are called, they check to see if the address is associated with ISO country code NL. If so, they insert a space with this instruction:

addressZipCodeId = substr (addressZipCodeId, 1,4) + ' ' 
+ substr(addressZipCodeId , 5,2);


Now this is fine if your Netherlands postal codes were entered without a space to begin with. The code above forces them to (what I can only guess is) the accepted format. This is a big problem, though, if your database already stores the accepted format for these postal codes; in which case you will end up with a mangled version with 2 spaces and missing the last character!

A quick fix is to add a line that checks to see if the Netherlands postal code is only 6 characters long and add the space only if it needs one.

if(strlen(addressZipCodeId) == 6)
addressZipCodeId = substr (addressZipCodeId, 1,4) + ' '
+ substr(addressZipCodeId , 5,2);


Friday, February 1, 2008

New features of Microsoft Dynamics AX 2009 (5.0)

Convergence 2008 is coming quickly, and careful readers of the session catalog can gleam some info on the upcoming release of Dynamics AX 2009 (5.0).

The new AOS will sport some new features: a server based batch framework, multiple time zone capability, 64-bit versions, and advanced clustering support.

AX '09 will also bring a new Expense Management solution for automating the management of travel and entertainment (T&E) expenses. Integrated with Financials and Project Accounting, it is delivered through the web-based Enterprise Portal.

Thursday, January 24, 2008

Dynamics AX 2009 (formerly 5.0 née 4.5)

As Convergence 2008 approaches, details are staring to leak out about the next version of Dynamics. It looks like the long-anticipated 5.0 release is going to be chronologically renamed "2009". The good news is that the release date is still 2008 … the bad news is it seems to have slipped from "first half of 2008" to "summer 2008." This of course is a way of saying "3rd quarter" that doesn't sound as bad.

There are a few high-level features that make for great ad copy: better integration with office, role-tailored menus and business dashboards, and support for tfeL-ot-thgiR languages. IT departments, though, are still waiting to see the detailed features list – all the little things that don't sound impressive in a sales pitch, but that can make a business run better.

For those who have not yet made the jump to version 4, you'll be glad to hear this: A Microsoft project manager on the Dynamics AX team has promised that clients will be able to upgrade directly from 3.0 to 5.0. It was posted in Microsoft's public newsgroup for AX programming. I'm sure this does not qualify as an official announcement, but it is a good indication that there will be a path for customers on the earlier release.

I'll keep posting news as I come across it. Heard something interesting about 5.0 / 2009? Post it as a comment!