Thursday, May 28, 2009

Product builder performance tip

I recently had the client/server trace on, while opening the production builder configuration form. Boy, I wish I didn't…

Depending on how complex your product model is, this for generates an excessive number of calls between the client and server.

In my case, the largest group of calls was calls made to \Data Dictionary\Tables\PBALanguageTxt\Methods\label.

The method is tied to be executed on the server, with the "server" keyword.
But, the table itself is cached as EntireTable, and this means that the client is likely to holds its own cache of the values and thus there is no need, and in particular, no gain of forcing AX to run the method on the server.

When I remove the "server" keyword from this method, I get rid of the majority of client/server calls while opening and navigating in this form.

There is however still room for improvement, as the form still generates a huge amount of calls.

Wednesday, May 27, 2009

Create comments with a saved change request number

I have written a small editor script which allows you to insert a pre-formatted comment, with the option to save and reuse a change request number as part of the comment.

After installating the xpo, the new script is avaible in the X++ editor from Script (Alt+R) \ Scripts \ Comments \ SavedComment.

The comments made with the script is formatted like this:
//[date] [current user id] #[change request number]

You can download the script from my SkyDrive:

Use of the script is entirely at your own risk.

Monday, May 25, 2009


A small but not uninteresting little parameter has sneaked its way into AX 2009. The research method on form data sources now allows you to make AX reposition the cursor to the active record you were placed on when calling research.

To do this, call xxx_ds.research(true).

This little parameter saves you the effort of saving data for the record you are on, and use the saved data with the find() method to find the record again, and hopefully (I haven’t tested this though) it has much better performance than the find method. Performance couldn't really be worse than with the find method, so I assume performance is much better when MS introduces this as a new parameter.

Link to MSDN SDK documentation for the method: