Hi there,
I am trying to update a picklist which contains a serial item (and pre-allocated serials).
Can you guys advise how this should be handled?
I have tried the following code with no success:
oPicklist.Lines.SetCurrentLine(k) oPicklist.Lines.PickedQuantity = #PickedQtty(k)# For i = 0 to #NoOfSerials# oPicklist.Lines.BinAllocations.SetCurrentLine(i) oPicklist.Lines.BinAllocations.BinAbsEntry = CInt(#BinAbs(i)#) oPicklist.Lines.BinAllocations.Quantity = CDbl(#BinQty(i)#) oPicklist.Lines.SerialNumbers.Add() oPicklist.Lines.SerialNumbers.SetCurrentLine(i) oPicklist.Lines.SerialNumbers.InternalSerialNumber = #Serial(i)# oPicklist.Lines.SerialNumbers.ManufacturerSerialNumber = #Serial(i)# oRecordSet = clsSAPB1_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset) Dim sSQLQuery As String = "SELECT SysSerial FROM OSRI WHERE IntrSerial = '" & #Serial(i)# & "'" oRecordSet.DoQuery(sSQLQuery) oPicklist.Lines.SerialNumbers.SystemSerialNumber = oRecordSet.Fields.Item("SysSerial").Value oPicklist.Lines.SerialNumbers.Quantity = CDbl(#SerialQty(i)#) oPicklist.Lines.SerialNumbers.BaseLineNumber = oPicklist.Lines.OrderRowID oPicklist.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0 oPicklist.Lines.BinAllocations.Add() Next
Note that everything in # are the values being passed from the respective arrays/datatables
Is there anything I am missing?
Thanks,
G