Friday, October 30, 2009

Alternative method to open a webpage from Ax

When you want to show your users a webpage from within Ax, you can use the ShellExecute command. Like this

WinApi::shellExecute('www.blogger.com');

You can use this format to open/show a specific XML file from disk as well. Like this:

WinApi::shellExecute('yourfile.xml','',@'C:\XMLFolder');

This will fire up your XML editor/viewer (possibly MS Internet Explorer) and display the specified file.
As an alternative, you can use the infolog for this as well. Like this:

infoLog.urlLookup('www.blogger.com');

or

infoLog.urlLookup(@'C:\XMLFolder\yourfile.xml');

This alternative method does not require extended security measures, like required when you use the WinAPI functions.

Yes, it's compatible with Windows 7!


As everyone expected, Ax 2009 is compatible with Windows 7. The Ax system requirements have been updated to reflect the changes with the coming of this new OS.
The Professional and Ultimate Edition of Windows 7 are supported, in 32 and 64 bit versions.
But not only Ax 2009 is officially supported, also Ax Version 4 SP2 is certified to be used with Microsoft's latest client OS (as can be read on the MS Dynamics Ax UK blog, over here).
Good news indeed, as we in IT are in a constant loop to upgrade both applications and os to keep them running nicely together, in an officially supported environment. This gives Ax V4 users a chance to try out Windows 7, without the immediate need to upgrade their Ax environment to Ax 2009 as well. If it ain't broken, don't fix it.

Friday, October 9, 2009

How to add leading zeros to a string

When sorting numeric values in an alphanumeric way, you may become unexpected results. Like this

1
11
2

In such cases, it may be helpful to add leading zeros to your string.

And tadaah! Ax to the rescue, again there is a helpful built-in function available, strRFix.
How it works? You specify your value to convert, the desired lenghth of the string and the character to use as a "filler".

Example:

info(strRFix('1',4,'0'));

gives '0001'.
The above numeric values sorted with their alphanumeric counterparts look like this:

0001
0002
0011

Use the function like this:

strRFix(int2str(intvalue),4,'0');

(Replace the intvalue with your variable. )

Basically, you can use this function to right align a string, based on a fixed length.
And don't forget you can specify your own character to 'fix' the string. So dots are allowed, as well as a space.

This function is relatively new in Ax, and even goes without any documentation in the standard help files and on Microsoft's MSDN. Too bad, as unknown is unloved.

Edit:
As someone pointed out in the comments, not so new function at all. After lookin' into it, I found out it's even available in Ax V3 (maybe even earlier?). Lacking good documentation for sure!

Friday, October 2, 2009

Classic artwork - Nostalgic post

Recently I read this post over at DynamicsWorld. It is a post about the timeline of Dynamics Ax, aka Axapta, with all the various milestones of its existense.

The post made me think about the old days and all the different versions of Axapta we've had a chance of working with in the past. And yes, it made me a bit nostalgic. I thought I share with you some of the artwork of old Axapta versions. Maybe you can remenisce as well, or just get an idea on where Ax comes from.




The Axapta program icon, as used in versions 1.0 and 1.5.
(Note: The demo data included at that time, we are speaking 1998-1999, was a whopping big 5Mb DAT file...)




The main menu from version 1.5 has, for todays standards, a very basic look-and-feel.


With version 2.5, you could say Axapta went into its "orange" phase.

The Axapta program icon in version 2.5

The splash screen from version 2.5:

The main menu, as used in version 2.5.

By that time, besides building it's own modules, functionality from third parties was already integrated in Axapta (see the Shop Floor modules in the print screen).

As you can see by the number of tabs in the main menu, less was more those days.

After the release of version V.25, Damgaard regrouped the functionality. (For example: customers and sales go together, like items and BOM.) This made the size of the main menu somewhat controllable in version 3.0.

Note: We never really went LIVE with version 1.0 or version 1.5. We used version 1.5 for demo purposes internally, used version 2.0 to test and to start up with. Pretty soon after that came version 2.1.