In trying to send an SO to Acumatica, I am getting the following error:
PX.Api.ContractBased.OutcomeEntityHasErrorsException: PX.Data.PXException: Error: The system failed to commit the Transactions row.
at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)
at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()
at PX.Api.ContractBased.Soap.WebApiSoapController.Post(ISoapSystemContract systemContract, XmlReader requestReader, String serviceNamespace, String internalNamespace, MethodInfo method, Func`1 serviceFactory, IEdmModel edmModel)
at PX.Api.ContractBased.Soap.WebApiSoapController.<Post>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at PX.Api.ContractBased.Soap.WebApiSoapController.<Login>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
I am using this code to send the SO:
Dim inv As SalesOrder = DirectCast(con.SoapClient.Put(BuildSO(con, trans)), SalesOrder)
Protected Function BuildSO(con As AcumaticaConnection, inv As Transaction) As SalesOrder
Dim out As New SalesOrder
With inv
out.OrderType = New StringValue With {.Value = "SO"}
If .Customer.HasID Then out.CustomerID = New StringValue With {.Value = inv.Customer.NameString}
If .TxnDate.HasValue Then out.Date = New DateTimeValue With {.Value = inv.TxnDate}
If .RefNumber.HasFullName Then
out.OrderNbr = New StringValue With {.Value = inv.RefNumber.FullName}
out.CustomerOrder = New StringValue With {.Value = inv.RefNumber.FullName}
out.Description = New StringValue With {.Value = inv.RefNumber.FullName}
End If
If .HasMemo Then out.Note = .Memo
If .HasShipVia Then out.ShipVia = New StringValue With {.Value = inv.ShipVia}
Dim details As New List(Of SalesOrderDetail)
Dim lnum As Integer = 1
For Each l As TransactionLine In inv
Dim detail As New SalesOrderDetail
detail.LineNbr = New IntValue With {.Value = lnum}
lnum += 1
detail.InventoryID = New StringValue With {.Value = l.ItemKey}
If l.Qty <> 0 Then
detail.Quantity = New DecimalValue With {.Value = l.Qty}
End If
If l.HasUnit Then
detail.UOM = New StringValue With {.Value = l.UnitofMeasure}
Else
detail.UOM = New StringValue With {.Value = "EA"}
End If
details.Add(detail)
Next
out.Details = details.ToArray
End With
Return out
End Function
I have tried making sure all the fields filled out in the i210 course are filled out in my code (thus the UOM bit), but nothing I change seems to make a difference. Is there anything I can do to at least get more information about what the error might be so I can troubleshoot further?