As we already know, codeunits, as well as other application objects, are created in the Object Designer. The first time you save a new object, you will be requested to assign an ID number and a name to it and compile the object. But the Compiled option prevents saving the object if its code has syntax errors. Let's see how we can handle the commonplace situation of saving an object before fixing bugs.
Compiling a codeunit and error handling
Handling compilation errors
If the code of an object contains a syntax error, an attempt to compile this object will fail, and the compilation will stop on the first encountered error. Let's modify the Hello World example from the previous chapter and see how the Object Designer...