Using a form to build a lookup
For the most complex scenarios, where you need some advance lookups with more options on data filtration or selection; Dynamics 365 for Finance and Operations offers the possibility to create and use a form as a lookup, by creating a new form.
Similar to forms, the form lookups support various features, such as tab pages, event handling, complex logic, and so on. In this recipe, we will demonstrate how to create a lookup using a form. As an example, we will modify the standard customer account lookup to display only the customers who are not placed on hold for invoicing and delivery.
How to do it...
- Add a new project and create a new form named
CustLookup
. Add a new data source with the following properties:
Property | Value |
Name | CustTable |
Table | CustTable |
AllowCheck | No |
AllowEdit | No |
AllowCreate | No |
AllowDelete | No |
OnlyFetchActive | Yes |
- Right-click on
Design
andAdd form Pattern
Lookup - Basic
on design. - Add a new grid control to the form's design with the following properties:
Property | Value... |