I have the following code which connects to DI Server via b1ws to update a Sales Order. Its very simple and should work, however when ever the document is updated the following error is returned. Please note the connection and disconnection to/from the DI server is handled in other functions.
[ORDR.PayDuMonth][line: 0] , 'Field cannot be updated (ODBC -1029)'
I have checked the following:
1. Field PayDuMonth xml config is present in the wsdl file.
2. DI service is functional and I can connect and disconnect.
3. Other b1ws code i have written works fine, but this is the first code I have written which updates a document.
4. Tried setting boOrder.PayDuMonthSpecified=false
I am running SAP 8.8 PL20, B1WS v1.1
What could explain this issue?
DimboOrderServiceAsNewb1ws_Order.OrdersService Dim boOrder As New b1ws_Order.Document Dim boParams As New b1ws_Order.DocumentParams Dim boMsgHeader As New b1ws_Order.MsgHeader Dim intDocKey As Integer Try With boMsgHeader .SessionID = HttpContext.Current.Session("di-session-id").ToString() .ServiceName = b1ws_Order.MsgHeaderServiceName.OrdersService .ServiceNameSpecified = True End With boOrderService.MsgHeaderValue = boMsgHeader intDocKey = intSalesOrderRef - 20000000 boParams.DocEntry = intDocKey boParams.DocEntrySpecified = True Debug.WriteLine("Retrieving Sales Order " & intDocKey & "/" & intSalesOrderRef) boOrder = boOrderService.GetByParams(boParams) Debug.WriteLine("Writing comment to database: " & strComment) boOrder.U_WorksOrderComment = strComment Debug.WriteLine("Updating Sales Order " & intDocKey & "/" & intSalesOrderRef) boOrderService.Update(boOrder) Return "ok" Catch ex As Exception Return ex.Message End Try