Technical description
The NoSeriesManagement Codeunit has a number of functions, such as TestManual, InitSeries, and LookupSeries. We will focus on how to implement them as part of the primary key. Another example is to implement Number Series to automatically populate the Document No. field in the Journal Lines. This is outside the scope of this book.
To implement Number Series so as to uniquely assign values to the primary key, the following steps need to be implemented.
The Table reference field
As a reference to the Number Series that was used, a field is required as part of the table. This field is called No. Series, and has a table relation with the No. Series table. This field is not a part of the user interface, and should be non-editable.
When a table needs to have more than one No. Series, a functional prefix should be added to explain what it is used for.
Setup reference
In order for the system to know which Number Series to use for which implementation, a reference...