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:

    nav 2015 code commntng

  • Multi Line Comment:
    Either we can comment all lines as single line comment manually like below picture.

    Method 1:

    nav 2015 code

    Method 2:

    Place those lines which we wish to comment within two curly braces ({ }). But code editor will not show any hint of commenting.

    nav 2015 customer import

    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…).

    nav 2015 demo databse

Integrate NAV with eCommerce, Marketplace and CRM