How do I hide enum values from a combo box in X++?
How do I hide enum values from a combo box in X++?
1 answer
Write an answerThere is not one universal hideEnumValue() call that I would use everywhere. The right solution depends on the scope.
If the value should not exist as a valid option anywhere, fix the enum/model design. If the value is valid globally but should not be selectable on one form, handle it on that form by controlling the combo/lookup choices for that specific control.
The important part is not to change a shared enum globally just to solve one screen-specific requirement. That can break completely unrelated processes that use the same enum.
If this is a standard enum and you only need UI-specific filtering, keep the change in the form extension instead of trying to remove the enum value itself.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer