Extensible enum values are not deterministically assigned to a numerical value.

Warning: Assigning a numerical value to extensible enum 'Extensible Enumeration(EnumerationType)' will yield unexpected results. Extensible enum values are not deterministically assigned to a numerical value.

Warning: Comparing a numerical value with extensible enum 'Extensible Enumeration( EnumerationType)' will yield unexpected results. Extensible enum values are not deterministically assigned to a numerical value.

Same integer value for additional options to standard enumeration types (enumeration extensions) are not guaranteed across different environments.
Therefore you need to avoid comparing integers with extensible enums and using integer values in integrations as extended options may have different integer value in several environments (if there are two solutions, which extend same enumeration type).

However FormComboBoxControl.selection() methods returns int eventhough control on the form is based on the specific enum type.
You can use enum2int global function to convert enum value to int (suppress warning in this case):
FormComboBoxControl.selection() == enum2int(EnumType::EnumOption)
Or convert value to enum:
EnumType enumVar = any2enum(currencyFilter.selection());


 

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units and "buy me a coffee" link.
Join us.

Blog Tags