--- title: "Error Message During Compiling: 'The Variable Is not of the Type CLASS'" slug: "error-message-the-variable-is-not-of-the-type-class" description: "This article describes a solution for the following compilation error that can appear in AX 2012: 'The variable is not of the type CLASS'." tags: ["Lasernet Connector ", "Compiling", "Variable", "Class", "AX2012"] updated: 2024-03-20T09:56:58Z published: 2024-03-20T09:56:58Z canonical: "kb.lasernetgroup.com/error-message-the-variable-is-not-of-the-type-class" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Error Message During Compiling: 'The Variable Is not of the Type CLASS' This article describes a solution for the following compilation error that can appear in AX 2012: > [!CAUTION] > Error > > The variable is not of the type CLASS. #### Version 4.1.x.x and Later ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-C6VFCVF6.png) #### Older Versions ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-RIS2FQPH.png) ### 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**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-7L6QAXAI.png) #### Older Versions 1. In the LAC class **LACValueSource_CustomCode** / **construct** uncomment the line with the missing **LACCustomCodeX**. 2. Save and compile only that class.