How to: Save a Codeunit

To save a codeunit, use the following procedure.

To save a codeunit

  1. Select the C/AL Editor, on the File menu, choose Save As.

  2. In the Save As window, in the ID field, enter an ID number that is used as a unique identification. In the Name field, enter a name that is used as a label.

  3. In the Save As window, choose OK.

  4. In the dialog box, select whether you want to compile the code before it is saved. If you save the codeunit without compiling it, you will not be able to run it or call any of the functions it contains.

    Note

    If you are working on a large and complicated codeunit, you may want to save your work at regular intervals, even though it is not yet finished and cannot yet be compiled. In this case, you must clear the Compiled check box before you save the codeunit.

See Also

Concepts

Codeunits