Thursday, May 4, 2017

Why we should use BEGIN END in our conditional Looping

This post is related to my one mistake so I just want to share it with all. This post will help my 

readers to understand how the conditional statement works in Navision and what is the impact of 

BEGIN END on all the Conditions.


For this I am using two scenarios of Code as shown in screenshot.

Image 1

Image 2

Image 3


Now in all the screen if you run the debugger it will show you the real facts.

Screen 1 and 3 are same in both the scenarios and working.

it will check all the three conditions.

Screen 2 is showing difference that whenever the IF condition before Begin is checked then either the

 whole code will be run else whole code will not be run by AL.

I hope it will be helpful to all developers of NAVISION. If you like my post then please share and 

comment.

No comments:

Post a Comment