Skip to Content
Former Member
Feb 06, 2006 at 01:33 PM

Update serial number detail for serial numbers automatically added by SBO.


Hello All,

Using SAP Business One I have a stock item which is setup as follows :-

Manage by serial numbers

On Release Only

Automatic Serial Number Creation on Receipt

This basically creates blank serial numbers for any incoming quantity (i.e. goods receipt) done within SBO. For example I'd end up with a serial number with a System Serial Number of 1, but with no detail in Manufacturers or Internal Serial Number.

My issue is I need a way when my user issues the item out (say through a sales delivery) to amend the serial number detail, i.e. fill in the manufacturers and internal serial numbers.

Dim manSerialNumber As String
Dim maxSerial As Integer

manSerialNumber = "A_TEST_SERIAL_PREFIX"
maxSerial = 1        'As an example

For i = 0 To totalNumber - 1
    With oDelivery.Lines.SerialNumbers
        .SystemSerialNumber = CStr(maxSerial)
        .ManufacturerSerialNumber = manSerialNumber + "_" + CStr(i)
        .InternalSerialNumber = manSerialNumber + "_" + CStr(i)
    End With

I would then go on to issue an oDelivery.Add() etc.

I've tried the preceding code in many guises, SetCurrentLine first and last, Add First and last all to no avail, any help would be greatly appreciated!