It looks like you're new here. Sign in or register to get started.
IF UserSetup.GET(USERID) AND (UserSetup."Main Menu ID" <> 0) THEN BEGIN //do something END;
IF (UserSetup."Main Menu ID" <> 0) AND UserSetup.GET(USERID) THEN BEGIN //do something END;
IF FuncA AND FuncB THEN ...
IF NOT (FALSE IN [FuncA,FuncB]) THEN ...
mdPartnerNL wrote: » But never used it because i found situations in where it didn't work.
mdPartnerNL wrote: » samlieshout example demonstrates a situation in where left to right doesn't work; IF FuncA AND FuncB THEN ... but am not sure if this will not work in 2013 and higher??
Comments
Yes it will match the conditions starting from left to Right. First you will get the record and once the record is there then you can check the condition.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page
Now all c/al code is converted to C# and it works as expected.
For example will execute both functions even if FuncA returns false (e.g. a GET fails).
If you want lazy evaluation you can use 'IN' e.g. will perform a lazy AND operation.
Microsoft Dynamics NAV | App Service Engineer | Comments are my own
Can you tell more about these situations?
IF FuncA AND FuncB THEN ...
but am not sure if this will not work in 2013 and higher??
Yeah, this behaviour is the same in the recent releases.
Microsoft Dynamics NAV | App Service Engineer | Comments are my own