In numerous situations, standard, automatic, or even dynamic runtime lookups cannot display the required data. For example, it might be a lookup with tab pages or a search field. In such cases, Dynamics AX offers the possibility to create an AOT form and use it as lookup.
In this recipe, we will demonstrate how to create a lookup using an AOT form. As an example, we will modify the standard customer account lookup to display only active customers.
In AOT, create a new form called CustLookup. Add a new data source with the following properties:
Property
Value
Name
CustTable
Table
CustTable
AllowCreate
No
AllowEdit
No
AllowDelete
No
AllowCheck
No
OnlyFetchActive
Yes
Index
AccountIdx
Change the form's following design properties:
Property
Value
Frame
Border
WindowType
Popup
Add a new Grid to the form's design:
Property
Value
Name
Customers
ShowRowLabels
No
DataSource
CustTable
Add a new StringEdit control to the...