General X++ Development

How do I hide enum values from a combo box in X++?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

How do I hide enum values from a combo box in X++?

SSunny Vasty75 reputation · answered Aug 13, 2026

There 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.