Lines for multiple headers

The goal of today’s excercise is to create a form with two grids (containing headers and corresponding lines). The trick is that if you select multiple headers, the form will display lines for all of them. The following form uses sales orders. Notice that selected orders are 1, 3 and 4 and displayed lines also …

Continue reading ‘Lines for multiple headers’ »

Code in forms

Almost every Dynamics AX developer knows them rule that business logic shouldn’t go to forms, but only few take it at least a bit seriously. It’s surprising that although developers complain about slow and hard to maintain forms, it doesn’t induce then to do something differently. I believe it has several reasons: Programmers often don’t …

Continue reading ‘Code in forms’ »

Dynamic method dispatch in X++

X++ is statically typed language, right? Still, sometimes we need to use it in a dynamic manner… The most common case is the need to call methods defined on a form. You can’t do it with static types – forms are technically instances of SysSetupFormRun class, which obviously doesn’t include methods you added to your …

Continue reading ‘Dynamic method dispatch in X++’ »