I had code for creating a dialog with dialog field of type 'str' in a custom class in AX2012. It worked fine in AX 2012, after upgrading the code to update3(AX 7) the same code gave an exception at DialogField's init method . No enum value in 'Types' matching 'str' is found.
The code used was dialogField1 = dialog.addField(identifierStr(str), "@AVA108");
As mentioned above it worked fine in AX 2012 so i have created a job using DialogField's init method from which this exception was thrown, it gave String as output in AX2012.
Types baseType;
identifierName typeName;
typeName = identifierStr(str);
baseType = str2enum(baseType, typeName);
info(enum2Value(baseType));
I have resolved this by using an extended type instead of primitive type. But i would like to know why this exception has been thrown.
Thanks in advance.
*This post is locked for comments
I have the same question (0)