on 02-06-2006 1:33 PM
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)
.SetCurrentLine(i)
.Add()
End With
Next
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!
Thanks.
Hi Lee,
Try this:
For i = 0 To totalNumber - 1
With oDelivery.Lines.SerialNumbers
.SetCurrentLine(i)
.SystemSerialNumber = CStr(maxSerial)
.ManufacturerSerialNumber = manSerialNumber + "_" + CStr(i)
.InternalSerialNumber = manSerialNumber + "_" + CStr(i)
.Update()
End With
Next
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You Update the object using the document object...
eg
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
.SetCurrentLine(i)
If i > 0 Then
oDelivery.Lines.Add()
End If
.SystemSerialNumber = CStr(maxSerial)
.ManufacturerSerialNumber = manSerialNumber + "_" + CStr(i)
.InternalSerialNumber = manSerialNumber + "_" + CStr(i)
End With
Next
oDelivery.Add()
Message was edited by: Daniel Archer
Message was edited by: Daniel Archer
Message was edited by: Daniel Archer
Daniel,
That's what I've explained in my example, I add the lines, then go on to add/update the entire document, however the serial numbers are not added/amended, there still seems to be no update to this thread. I've also tried the above scenario with 2005...Any help would be appreciated!
Am I going about this the wrong way? Can I only assign existing serial numbers when creating A/R Documents?
Thanks.
Lee.
Hi Lee,
I'm having the same problem here.
On Sales Delivery or A/R Inovice, the Serial Number must have had previously created.
Usint the application serial Numbers Management under Inventory menu, choosing the combo to "complete" option, you can create them.
But I have not figure out how to do this using SDK.
Have you find a solution for this ?
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.