C/AL Coding Guidelines used at Microsoft Development Center Copenhagen

Recently, the NAV Design Patterns team published the C/AL Coding Guidelines that we use at Microsoft Development Center Copenhagen to the Dynamics NAV Community Wiki site. Please join us there if you want to read and discuss the guidelines. 

However, we've been asked for a printable version of the guidelines as well, so we attached a PDF file with the current version to this blog post. This PDF file will not be updated if and when the guidelines change, so please consider them a snapshot as of January 2015. For more information, see the Dynamics NAV Community Wiki.


Best regards,

The NAV Design Patterns team

CAL Coding Guidelines at Microsoft Development Center Copenhagen.pdf

Comments (4)

  1. Jens Glathe says:

    Hi there,

    thanks for publishing it in a printable form. The online version is practically unreadable. Oh, and many thanks for publishing it at all 🙂

    These are good rules. I'm not so sure about the if..then begin..end rule, though. The more easily overlooked errors are in connection with "reduced" if..then..else statements. Therefore, for all code that can get more complex over time, I tend to use fully qalified begin..end. It looks redundant at first, until over time it grows in complexity and all branches have more than one statement. That's a normal tendency for on-site installations, in my experience.

    You know what would be a real help and a cherry on top: Publishing the C/AL syntax and grammar. 🙂

    with best regards


  2. Natalie K. says:

    True. When I did product development, our rule was to always use the full if..then begin..end stetement for the same reasons Jens already explained.

  3. Natalie K. says:

    The discussion about that can also followed in the corresponding article community.dynamics.com/…/191.begin-end.aspx

  4. Colin Bradley says:

    Thank you so much for making this available.

    It is such a help when discussing code changes with partners (I work with different clients and sometimes need the partner to make changes).

Skip to main content