Create Document from draft B1WS
We managed to create a stock transfer draft document using B1WS, now we need to convert the Draft document to StockTransfer.
Followed the below code but not successful, if anyone know how to pass the document information to save the draft to document, your help is really appreciated.
B1WSStockTransferDraftService.StockTransferDraftService myDraftSvc = new B1WSStockTransferDraftService.StockTransferDraftService();
B1WSStockTransferDraftService.MsgHeader oHeader = new B1WSStockTransferDraftService.MsgHeader();
oHeader.SessionID = "XXXX";
oHeader.ServiceName = B1WSStockTransferDraftService.MsgHeaderServiceName.StockTransferDraftService;
oHeader.ServiceNameSpecified = true;
myDraftSvc.MsgHeaderValue = oHeader;
B1WSStockTransferDraftService.StockTransfer myDraftDocument = new B1WSStockTransferDraftService.StockTransfer();
B1WSStockTransferDraftService.StockTransferParams oSTDraftParams = new B1WSStockTransferDraftService.StockTransferParams();
oSTDraftParams.DocEntry = int.Parse(docentry);
oSTDraftParams.DocEntrySpecified = true;
myDraftDocument = myDraftSvc.GetByParams(oSTDraftParams);
myDraftSvc.SaveDraftToDocument(); // How this is implemented?
The above code is giving us an exception : No matching records found (ODBC -2028)
Note: We tried similar code with DraftsService, but encountered same problem.