How to remove enum values from dialogs in Dynamics AX?
Hello readers, A common requirement which I have come across from time to time is the ability to hide certain enum elements on a form. There has been various solutions to the problem. The easiest one I saw was where the developer had created two enums, one with all the values and another one with the unwanted elements dropped. This approach has many problems as comparing the enum values in code isn't possible. In Dynamics AX 2009, the SysFormEnumComboBox class was provided to solve this issue. You pass it the combo box control's id, the enum to be used and a set of allowed values that need to be shown and it works as a charm. This approach can be used effortlessly on forms. Recently, I was posed if this can be done on a dialog. Well, its not as simple to use this on a dialog but I have another solution for the problem. Let us see this in more detail here. I've a very simple dialog with just the SysDimension enum showing up. The requirement is to remove the Purpose ...