This is the first part of a multi-post series that explains how to do a tree lookup in a reference group control on an AX form.
It’s simple, just look at those trees up there…
Oh, seriously…
This is something that keeps coming up on different projects, so I’d like to share how I usually do this. There are some examples out there which try to describe a very generic solution which can be used in almost any case. However, such solutions very quickly become very complex. To keep things simple, I have tried to keep this example fairly specific but adaptable to a wide range of circumstances. Specifically this example is using a fixed hierarchy structure with a fixed number of levels, each of which will be represented by a different table.
I’ll show how to build the lookup, how to load the tree items on demand to speed up the loading times as well as how to properly select and return the selected record. I’ll also show some suggestions for how to build the reference group properly so it is easy for the user to understand the information presented to him/her and to understand what to do.
This first part of the series shows how to set up the tables and their relationships.
Continue reading “How-to: Tree lookups in Dynamics AX reference group controls, part 1”