
Code commenting in MS Dynamics NAV 2015 C/AL Code:
Now there are three ways to comment MS Dynamics NAV 2015 C/AL Code:
- Single Line Comment:
Just mark two slash (/) in beginning of a line, in NAV Code, and Development Editor will change the color of commented line or lines as green, like other code editors. See the picture below:
- Multi Line Comment:
Either we can comment all lines as single line comment manually like below picture.Method 1:
Method 2:
Place those lines which we wish to comment within two curly braces ({ }). But code editor will not show any hint of commenting.

It’s always great to see some hint color change of commented lines. So we need to comment the lines by lines using double slash in all version of Dynamics NAV except Dynamics NAV 2015. In this version Dynamics NAV Code Editor got two new menu:
Comment Selection (Edit->Comment Selection…) and Uncomment Selection (Edit->Uncomment Selection…).

Samarendra Ghosh
VP Technology
Samarendra Ghosh is VP of Technology at APPSeCONNECT, a strategic technology leader with 15+ years architecting enterprise integration and automation products. He drives product engineering, platform stability, and innovation behind the company's iPaaS, leading breakthrough features across SAP, NetSuite, and AI-powered integration. Samarendra writes on integration architecture, low-code iPaaS, and building reliable, scalable automation systems.



