In NAV 2015 I by accident used SETCURRENTKEY with a key that not existed. When I ran the codeunit no errors occured.
When I look at the documentation it says
"If no keys can be found that include the fields that you specify, the return value is FALSE. If you do not test the return value, a run-time error occurs. If you do test the return value, the program will continue to run even though no key was found."
If I create a simple table with id and name the code below will return True (in 2013 R2 and 2015) no matter what field I select as key. In 2009 it behaves as the documentation.
keyworking := r.SETCURRENTKEY(name2);
MESSAGE(FORMAT(keyworking));
Is this a bug or is the documentation not up to date?
*This post is locked for comments
I have the same question (0)