Using a segmented entry control
In Dynamics AX, segmented entry control can simplify the task of entering complex main account and dimension combinations. The control consists of a dynamic number of elements named segments. The number of segments may vary, depending on the setup, and their lookup values may be dependent on the values specified in other segments in the same control. The segmented entry control always uses the controller class, which handles the entry and display in the control.
In this recipe, we will show how a segmented entry control can be added to a form. In this demonstration, we will add a new Ledger account control to the General ledger parameters form, assuming that the control could be used as a default ledger account for various functions. The example does not make much sense in practice, but it is perfectly suitable to demonstrate the usage of the segmented entry control.
How to do it...
1. In the AOT, locate the LedgerParameters table and create a new field...