Sometimes, the user interface requires us to change the status of a field, depending on the status of another field. For example, if the user marks the Show
filter checkbox, another field, Filter, appears or becomes enabled. In standard Dynamics AX forms, this can be done using input control event modified()
. But sometimes such features are required on dialogs where handling events is not that straightforward.
Very often, I find myself in a situation where existing dialogs need to be adjusted to support events. The easiest way of doing that is of course to build a form in AOT, which will replace the original dialog. But in cases when the existing dialog is complex enough, probably a more cost effective solution would be to implement dialog event handling. It is not as flexible as AOT forms, but in most cases it does the job.
In this recipe, we will create a dialog very similar to the previous one, but instead of entering the customer number, we will be able to select...