Skip to Content
0
Former Member
Jul 14, 2004 at 10:15 AM

How to select the batch number in a stock transfer

239 Views

Hi all,

I need to add a stock transfer for a batched item.

I used the DI object StockTransfer and StockTransfer_lines to add a stock transfer. However, the property StockTransfer_Lines.BatchNumbers does not seem to work (documentation says it is a read-only property). How can I specify the batch number for the stock transfer? Attached is my VB source code.

regards,

LuanBoo

Set mobjStockTr = SBO_Company.GetBusinessObject(oStockTransfer)

With mobjStockTr

.FromWarehouse = "01"

End With

Set mobjStockTr_Lines = mobjStockTr.Lines

With mobjStockTr_Lines

.Add

.ItemCode = "B10"

.Quantity = 1

.WarehouseCode = "02"

End With

Set mobjBatchNo = mobjStockTr_Lines.BatchNumbers

With mobjBatchNo

.BatchNumber = "555"

.Quantity = 1

End With

nReturn = mobjStockTr.Add