Building a tree lookup

Form tree controls are a user-friendly way of displaying a hierarchy of related records, such as a company's organizational structure, inventory bill of materials, projects with their subprojects, and so on. Such hierarchies can also be displayed in the custom lookups, allowing users to browse and select the required value in a more convenient way.

In the Using a tree control recipe in Chapter 2, Working with Forms, it was explained how to present the budget model hierarchy as a tree in the Budget model form. In this recipe, we will reuse the previously created BudgetModelTree class, and will demonstrate how to build a budget model tree lookup.

How to do it...

  1. In the AOT, create a new form named BudgetModelLookup. Set its design ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.