Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enabled for | Public preview | General availability |
---|---|---|
Admins, makers, marketers, or analysts, automatically | ![]() |
![]() |
Business value
To make AL loops easier to write and read, you can now use the continue keyword in AL loops to continue to the next iteration, just like you are used to in other major programming languages.
Feature details
Like in many other programming languages, AL now supports using continue
in loops to trigger the next loop iteration. Before, only the break
keyword was supported, but that canceled the whole loop, whereas the continue
keyword skips the current loop iteration and proceeds with the next.
To address that members, such as methods or fields in AL, might already be named continue, the continue
keyword in loops will not be supported if the context has a member called continue. This is to avoid a breaking change. The compiler will warn about this, but still allow declaring object types with the name continue.
Tell us what you think
Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.
Additional resources
Continue statement (docs)