Moving on

Hi all, I am about to leave MS, and this blog will be frozen. You are more than welcome to visit my new blog, dedicated to Dynamics AX: I hope that the new blog will benefit from me being closer to our clients. Cheers,Sasha


Remember to test performance!

When you write new code, and the execution time of this code is dependant on the number of records to process, you must ensure that the time grows proportionally to the number of the records. In many cases, it is not obvious how slow some algorithm is on large sets of input data. This is…


Relational operator ‘like’

After having 5+ years of X++ experience, I finally realized that the relational operator ‘like’ might equally well be used outside of select-statements, just like this: static void testLike(Args _args) {     str someString;     ;         someString = “Johnny”;       if (someString like “Joh?ny” || someString like “*ny”)     {         info(“Dammit, I should have…



I have just written a simple class that implements QuickSort algorithm and allows sorting of some “keys” by their “values”. And this is how it may be used:     static void exampleQuickSort(Args _args)     {         QuickSort       quickSort;         ListEnumerator  itemEnumerator;         str             itemId;         Qty             qty;         ;           quickSort = QuickSort::construct(Types::String, Types::Real);        …


By the way…

…the class that I mentioned in my previous post has been implemented in Dynamics AX 2009 as SysFormEnumComboBox. Be aware, that Vanya Kashperuk has published another version of this class, valid for both 4.0 and 2009.


How to exclude some enum values from a combobox?

Imagine a combobox based on an enum. By default it contains a list of items that correspond to the values of the enum. Quite often people wonder whether there is a simple way to limit this list to a set of allowed values. Maybe there is a solution posted somewhere in the net – please let me know…


Looking for help documentation

There is a simple way to programmatically fetch help documentation for system functions based on what text is stored in the xpo-files.If you run this:———————————————–static void getSystemDocumentation_Job(Args _args){    ;    info(Web::stripHTML(TreeNode::findNode(@”\System Documentation\Functions\abs”).AOTgetSource(), true, true));}———————————————–then an infolog will appear:———————————————–Information: Abs  [HEADER] Returns the absolute value of arg. Examples Abs(-100.0) returns the value ‘100.0’. Abs(30.56) returns the value…


The way to read weighty books

I am a lazy guy. And some time ago it was very difficult for me to brace up and read a good thick technical book from cover to cover. For example, “Code Complete, 2nd Edition” is 960 pages thick. I knew, that this one was a “must read” for every developer. I had been trying to read…


Import of dimension set rules

A couple of days ago I had a question. One guy had to generate dimension set rules for ledger accounts, based on information from an Excel file. The file contained 3 columns: the first one for ledger accounts, the second one for values of the first dimension (say, Departments), and the third column for values of the second…


Facts and Fallacies of Software Engineering

I have just finished reading “Facts and Fallacies of Software Engineering”, by Robert L. Glass. Quite a funny book, very easy to read. Highly recommended! Here are some of the facts he mentions and elaborates on: Fact 2 – “The best programmers are up to 28 times better than the worst programmers, according to “individual…