C/AL Editor

Adds C/AL code in triggers and user-defined functions.

To open this window, on the Tools menu, choose Object Designer. In Object Designer, choose Table, Page, Report, Codeunit, Query or XMLport, choose the Design button and then on the View menu, choose C/AL Code.


The C/AL editor was newly designed in Microsoft Dynamics NAV 2016. You can use the old version of the editor by running the Microsoft Dynamics NAV Development Environment from the command prompt. For more information, see Using the Development Environment from the Command Prompt.

Using the C/AL Editor

The trigger or function signature is displayed in bold text next to either a minus (-) or plus (+) sign that enables you to expand or collapse the code. You enter code for the trigger or function under the signature.

There are several features to assist you when you write code:

  • For a list of keyboard shortcuts, see C/AL Editor Keyboard Shortcuts and Right-Click Actions.

  • As you type, a list of valid members that begin with the entered characters appears. You can choose a member from the list to insert it in the code or if you continue typing characters, the list is filtered to include only the members that begin with those characters.

  • Breakpoints in code are indicated by circles in the left margin.

  • The first trigger in the C/AL Editor is the Documentation trigger. You use the Documentation trigger to add notes about the code or to document changes that you make. Anything in the Documentation trigger is treated as a comment by the compiler.

See Also

Programming in C/AL
Viewing the Definition of a Function or Object by Using Go To Definition
Standard and User-Defined Functions
Triggers Overview