Показать сообщение отдельно
Старый 09.02.2014, 18:35   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
I noticed some strange behaviour of NAV2009R2 with QUERYREPLACE (of course with File=>Database=Alter=>tab Options=>Enable for Microsoft Dynamics NAV Server=TRUE):

file.QUERYREPLACE(FALSE);

=> gives a warning "Function ‘QUERYREPLACE’ is obsolete for Microsoft Dynamics NAV Server.". Nice! I don’t want to have an error when running in the NAV-servicetier, so I will fix my code.

IF (NOT ISSERVICETIER) THEN

file.QUERYREPLACE(FALSE);

=> does NOT give a warning. So the NAV-compiler is intelligent and knows I will never use the QUERYREPLACE in the servicetier thanks to this IF-statement.

IF (NOT ISSERVICETIER) AND TRUE THEN

file.QUERYREPLACE(FALSE);

=> gives a warning. I will never use the QUERYREPLACE in the servicetier but the NAV compiler didn’t figure that out!

I admit this blog post will not help you in your development, but it is a nice fun to know feature.



Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.