any2Enum Function
Dynamics AX 2009
Converts an anytype value to an enum value.
enum any2Enum(anytype object)
static void any2EnumExample(Args _args)
{
NoYes a;
int i;
str s;
;
i = 0; // An int object that will be converted
a = any2Enum(i);
Global::info(strfmt("%1 is the output, from input of the %2 int object.", a, i));
s = "1"; // A str object that will be converted
a = any2Enum(myAny);
Global::info(strfmt("%1 is the output, from input of the %2 str object.", a, s));
}
/**** Infolog display.
Message (01:05:30 pm)
No is the output, from input of the 0 int object.
Yes is the output, from input of the 1 str object.
****/
Community Additions
ADD
Show: