Skip to Content
0
Former Member
Mar 01, 2006 at 04:51 AM

Few issues with serial number object Goods receipt / invoices

77 Views

Hi ,

I have two issues.

my scenario is that I want to create a goods issue for the line item in an invoice. the item in the invoice is serial number managed ( and set to on every transaction )

Issue Number 1:

what I need to do is to grab the serial numbers that was used for the items from the invoice. I used the following code to do that but, the serial number is blank.

For i = 0 To oInvLines.SerialNumbers.Count - 1
    oInvLines.SerialNumbers.SetCurrentLine i
    oGoodsReceiptLine.SerialNumbers.SetCurrentLine i
        oGoodsReceiptLine.SerialNumbers.InternalSerialNumber  = oInvLines.SerialNumbers.InternalSerialNumber
Next

Issue No 2:

I need to re-use the serial numbers that was used for the items in the invoice and use them in the goods receipt . This is allowed when you do manually ( Business One simply asks a question - and you will clcik ok). But using SDK I could not find a way to force it. I get a error message similar to : duplicate serial number .....

Thanks heaps in advance.

Indika.