Removing enum value from a form combobox

This is an example of how to remove a enum value at runtime from a combobox in a form. The enum have 2 values:

  • Enum : : value1
  • Enum : : value2

Overwrite the “enter” method on the combobox and write the following.


Now only option 1 will be displayed.

Get the technical value of an enum

You mayby need to retry the value of an enum.

For example : you have this enum : SalesUpdate::DeliverNow, and you will recover DeliverNow, not the label which can be in French, Dutch, English, …

You can proceed like this :

info(new DictEnum(enumNum(SalesUpdate)).value2Symbol(SalesUpdate::DeliverNow));