- Print
- PDF
Error Message During Compiling: 'The Variable Is not of the Type CLASS'
Article summary
Did you find this summary helpful?
Thank you for your feedback
This article describes a solution for the following compilation error that can appear in AX 2012:
Error
The variable is not of the type CLASS.
Version 4.1.x.x and Later

Older Versions

Resolution
This occurs if you have added an element with a custom code but deleted the custom code class afterward. for instance, LACCustomCode3.
Version 4.1.x.x and Later
In the LAC class LACValueSource_CustomCode / newCustomCode uncomment the line with the missing LACCustomCodeX.

Older Versions
In the LAC class LACValueSource_CustomCode / construct uncomment the line with the missing LACCustomCodeX.
Save and compile only that class.