Monday, December 26, 2011

Cool project on CodePlex

Here's a really cool project, creating an adapter for CSV files to BOF (Business Operation Framework) services.

Tuesday, December 20, 2011

Odd CIL compilation issue

I'd really like some input on this article, if anyone has experienced something similar.

I had a couple of CIL compilation errors today in an imported model. The errors all pertained to a new field that was added to a couple of tables. After setting a random LegacyId for the field, I was able to do a successful CIL compilation, and I was also able to compile successfully after removing the LegacyId again.

I don't know if it was the LegacyId change that did the trick, or just the fact that I made a change to the tables.

Please let me know if you have had similar issues and what ideas you may have to fix them.

(And of course we did, without luck, try all the usual stuff, restarting AOS'es, recompiling X++ etc)

Friday, December 16, 2011

Import CSV files using AIF

I was really happy back in January when I learned that you can now can import CSV, and other flat files, into AX using AIF with .NET transformations. Many proprietary file imports, and exports, can now be handled by AIF allowing you to focus on the business logic rather than the nitty-gritty file handling stuff.

But since then I have missed proper documentation on how you actually go about it. The article "Walkthrough: Creating a .NET Assembly Transform" on MSDN, doesn't quite get you to the finish line, where you have a file the AIF can actually read.

Today however I found a three part blog series where part 3 ends up in having a file that AIF will consume.

I recommend that you read all three parts you want to play with these transformations. Here's the link to part 1:

Monday, December 12, 2011

Color code forms in AX 2012, depending on environment/company

One thing that you might miss in the AX client is as a higher visibility of which company and environment that you’re working in. I have seen plenty of solutions where the entire background of forms is colored according to the current company, making each form look like something the cat has coughed up.

The least intrusive solution and the only one I have taken time to modify a bit and implemented at a customer is the one made by Arijit Basu. I have modified it, allowing you to choose your own color and a customer text per AOS. Since not all forms are designed entirely correct, the solution unfortunately doesn’t work as expected on all forms.

In AX 2012 the game has changed, because there is no background left on the forms to color. But the good folks at Microsoft has anticipated that we want to do some coloring still, and there’s a new method on FormRun which allows you to color the background of the statusbar; setStatusBarBackgroundColor.

I have made a solution using this method. The solution allows you to select a color per database server, database and company. If you don’t specify a company, the color works for all companies on the selected server and database.

I have included database server and name to support the scenario where you copy your production database to a test database. This way you can setup the indication for working in the test environment from your production system and you don’t need to add any information after having copied production data to test.

The solution is absolutely version 1, but I expect to add more features for the visualization in the time to come. One thing I’d like to add as soon as possible is some kind of identification in the infolog.
I have one known issue with the solution, which is that the lookups on database server and database don’t quite show all the servers and databases that I expected. I’ll look into that at some point, but any hints are welcome.

Example of form:

You can download the solution as an XPO or a model file from my SkyDrive.