Using regions in AL code

Did you know that you can use CSharp-like regions in AL code? Somehow, a generic VSCode feature applies to AL files as well!

Compiler seems to accept //#region + //#endregion pairs since those are just comment lines. Publishing and debugging works fine.

Both //region and //#region styles work, so it depends on your preference which one to choose.



Another great feature to have better organized AL code. 😎

Author: Márton Sági


Leave a Reply