Maximize a form in Ax

Change the properties width = ‘column width’ and height = ‘column height’ on the form. Add the following code in the run-method of the form: #WinApi ; super(); WinApi::showWindow(this.hWnd(), #SW_SHOWMAXIMIZED);#WinApi ; super(); WinApi::showWindow(this.hWnd(), #SW_SHOWMAXIMIZED);

Ax2009 Event Processing Error

I have a customer that gets a error every time the EventJobCUD-batch (Change Based Events) runs. They got the following error: After some reseach I found out that when 2 fields are changed at the same time, you go several times through the listChangedFieldsEnumerator (location ClassesEventProcessorCUDprocessUpdate) 1 2 3 4 5 6 7 8 9 […]

Ax 2012 Editor improvements

In Microsoft Dynamics AX 2012, a new X++ Editor is introduced which replaces the current legacy editor. The new X++ Editor is based on hosting a Visual Studio 2010 Editor Framework control. Here are a few Tips & Tricks: Type ‘main’ + TAB: The editor generates a standard Main-method. Note: This trick works with all […]

Change the language at runtime

Normally when you change your language you go to your user options, change your current language and the restart the client. This week I got the question if it was possible to do so in runtime. You can do so by just calling the infolog.language(str 7 _languageCode). All labels that you load after calling this […]

Amount in words

This week one of my customers asked me to place the amount in words on a invoice. I couldn’t believe that sush function wasn’t availible in standard Ax. After some research I found that the Global-class contains the following methods: static TempStr numeralsToTxt(real _num) static TempStr numeralsToTxt_EN(real _num) static TempStr numeralsToTxt_ES(real _num) static TempStr numeralsToTxt_FR(real […]

Portal development

While surfing the web, I came across a blog from 2 friends (Youri De Brabandere and Christof Decraene) about Enterprise Portal development. For the moment they have only a few posts, but I’m sure their will be more soon. Have fun with the

Ax Security got lost

At one of the customers I’m currently working they took the decision to take a look at the spaghetti of security keys. We made a plan of how the new basic security-structure should look like and implemented it. After releasing this new more logical security structure we started to get the message ‘%2 %1 not […]

Loop all tables

There is a simple trick to loop all tables that are available in Ax. Just use the Dictionary-class that contains all information about tables. Small example to list all tablenames + their corresponding Id. 1 2 3 4 5 6 7 8 9 10 static void JeDoe_listTables(Args _args) { Dictionary dictionary = new Dictionary(); int […]

How to make methods on fields disappear (aka a bug)

Me and some of my colleagues are currently working with a customer on a Ax 2009 SP1 RU4. The other day we came to the¬†conclusion that the modified methods on fields in a form suddenly disappeared. I know, you should write as less as possible code on a form, but sometimes there is no way […]