I have a working Visual Studio for Dynamics GP application where I successfully update Location Codes and Line Item Quantities in Sales Transaction Entry using Global Table Buffers as demonstrated in the Visual Studio Tools for Microsoft Dynamics GP Programmers Guide. I have run into a problem when trying to update the Ship To Address information on a Return Sales Document. Running .Change() gives noerror as the response but after specifying changes and running .Save() the error is "Sharing".
These are the same steps I use elsewhere to update values, including Location and Quantites. I have sample code below. Has anyone successfully updated Ship To Address information using this?
Dim lastError As TableError
Dim SopHdrWorkTable As SopHdrWorkTable = Dynamics.Tables.SopHdrWork
SopHdrWorkTable.Key = 1
SopHdrWorkTable.SopNumber.Value = "SOP1234"
SopHdrWorkTable.SopType.Value = 4
' Open the table buffer by getting the record
lastError = SopHdrWorkTable.Change
If lastError = TableError.NoError Then SopHdrWorkTable.Address1.Value = "Some Address 1 Value"
lastError = SopHdrWorkTable.Save()
If Not SopHdrWorkTable Is Nothing Then SopHdrWorkTable.Close()
End If
*This post is locked for comments