Throughout Business Central, master records (for example Customer, Vendor, Item, and so on) and activity documents (Sales Order, Purchase Order, Warehouse Transfer Orders, and so on) are controlled by the unique identification number assigned to each one. This unique identification number is assigned through a call to a function within the NoSeriesManagement codeunit. That function is InitSeries. The calling format for InitSeries is as follows:
NoSeriesManagement.InitSeries(WhichNumberSeriesToUse, LastDataRecNumberSeriesCode, SeriesDateToApply, NumberToUse, NumberSeriesUsed)
The WhichNumberSeriesToUse parameter is generally defined on a Numbers Tab in the Setup record for the applicable application area. LastDataRecNumberSeriesCode tells the function what Number Series was used for the previous record in this table. The SeriesDateToApply parameter allows the function to assign ID numbers in a date-dependent fashion. NumberToUse and the NumberSeriesUsed...