Get Integer from Enum in BC 13 and BC 14
This is just one of my own feature reminders. Since I develop extensions for customers in older Business Central versions (e.g. October 2018 release and April 2019 release) I often run into the problem that many enum functions like AsInteger() are only available in runtime versions > 4.0.
enum 50100 "My Order State"
{
value(0; None)
{
}
value(1; Imported)
{
}
value(2; Accepted)
{
}
value(3; Shipping)
{
}
}
local procedure GetIntegerFromEnum(OrderState: enum "My Order State") r: Integer
begin
Evaluate(r, format(OrderState, 0, 9));
end;