I have some code that checks for a duplicate value in a table:
IF NOT MyTable.ISEMPTY THEN
The table has a key defined for "Parent ID","Tier Code","Code". Do I have to, or from a performance standpoint is it recommended to add a line to the above code at the beginning?:
MyTable.SETCURRENTKEY(“Parent Id”,”Tier Code”,Code);
I seem to recall that if NAV finds an appropriate key for a query like this, it will use it automatically without my having to specify it.
We're on NAV2016.