I have a test table in NAV 4.03. This table contains 2 records. What I am attempting to do is to use recordref to find the last record so that I can increase the integer primary key field by 1. The function once running would then be modified to accept a table number as a paramter and return the next number.
When I use the code below, it never finds a record even though it exists.
RecRef.OPEN(TableNo,FALSE);
IF RecRef.FINDLAST THEN BEGIN
...
END;
0
Answers
Try this and see what it returns:
www.NextEqualZero.com
A technical eye on Dynamics NAV