Using AutoIncrement in Dynamics NAV is an alternative to using Number Series or calculating new number based on a FINDLAST on the Record you are about to insert into.
There can only be one AutoIncrement field in a Table.
You must be member of db_owner on the database in SQL to set the AutoIncrement property.
Autoincrement does not work on Temp Tables
When inserting records into a table with an AutoIncrement field, the field is not assign a value, and if visible in Page, it should not be editable.
Always count up (handled by SQL)
No tablelock because of Numberseries.
No FINDLAST to calculate new number.
If a transaction is rolled back, the number is NOT reused. (not always important)
Lets create a AutoIncrement field:
Create a field of datatype Integer og BigInteger.
Set the AutoIncrement property to YES.
Assign 0 to the field in OnInsert();