I'm trying to create an Inventory Transfer through the DI Server, but no matter what I try I keep getting -5002 Not enough data.
I've tried through the DTW sending just DocDate and FromWarehouse for the document and ItemCode, WarehouseCode and Quantity for the row and it worked. DTW template only specifies CardCode as mandatory, but this is wrong (works fine without) and DI Server still returns -5002 even with CardCode.
SDK documentation for DI API for the Add method of the StockTransfer object only states "You must values for the mandatory properties, and then call the Add method.", but stops well short of specifying which properties are mandatory. So typical!
Using v8.81.315 PL07. Not using serial numbers or batches. XML stream follow. Thanks for your help!
05/04/2012 17:44:22 Request
<?xml version="1.0" encoding="UTF-16"?>
05/04/2012 17:44:22 Response (Fault)
<env:Text xml:lang="en">Not enough data </env:Text>
Hi, you should save it as draft first.
Dim draft As SAPbobsCOM.IStockTransfer
draft = oCompany.GetBusinessObject(BoObjectTypes.oStockTransferDraft)
' Draft details
draft.CardCode = "Code1"
And then convert draft to stock transfer
Then add your StockTransfer_Lines.
Hope it helps you.
Thanks for your input, however I'm trying to do this via the DI server, not DI API. Also, why do you think it is necessary to create a draft first? Does the documentation suggest that? It is certainly not required for any other type of document (e.g. goods issue) which I have created successfully via the DI server.