REST - Add Lines with TransferOrderEntrySvc

I’m trying to add a Transfer Order Line using the REST to call Erp.BO.TransferOrderEntrySvc/TFOrdDtls. I keep getting an error in the Event Viewer on the Epicor server that says:

              Order has been shipped, cannot add.

Even though, the transfer order that I’m using in the JSON that I’d passed in is clearly not shipped and I’m able to manually add transfer order lines within Epicor to the same transfer order.

Has anyone run into this before or can offer any suggestions?

Thanks

I am still gun shy on some of the REST mapping so usually have an issue reproduced in BLTester first. Can you hit the same method (UpdateExt?) on the TransferOrderEntrySvc and see if you can isolate it as a BO issue or a REST issue?

Yes, I can confirm calling POST on TransferOrderEntries (UpdateExt) works and does create a Transfer Order in Epicor. However, I’m just not able to create any order lines using REST.

As an added note, I’ve also tried adding customer shipments and shipment lines through REST and both worked as expected without any issues.

Thanks.

Example url and payload that is failing?

URL = https:///api/v1/Erp.BO.TransferOrderEntrySvc/TFOrdDtls
JSON (I’ve tried setting RowMod to U, A, and blank) =

{
“Company”: “13”,
“TFOrdNum”: “TSF1234”,
“TFOrdLine”: 0,
“OpenLine”: true,
“PartNum”: “100000”,
“OurStockQty”: “10”,
“SellingQty”: “10”,
“WarehouseCode”: “03”,
“Plant”: “A”,
“ToPlant”: “B”,
“OrderFirm”: true,
“ManualOrder”: true,
“ShipViaCode”: “FDEG”,
“TFLineNum”: “”,
“NeedByDate”: “2017-11-30T22:23:08.860Z”,
“RequestDate”: “2017-11-17T22:23:08.860Z”,
“Shipped”: false,
“StockTrans”: true,
“StagingWarehouseCode”: “03”,
“StagingBinNum”: “BinA”,
“FirmUser”: “”,
“OurStockQtyUOM”: “ea”,
“SellingQtyUOM”: “ea”,
“SelectForPicking”: false,
“LinkToContract”: false,
“TransferContractID”: “”,
“TransferLinkToContract”: false,
“CreateOrder”: false,
“LineStatus”: “Open”,
“Selected”: false,
“ThisOrderInvtyQty”: “10”,
“ShipViaCodeDescription”: “FED EX GROUND”,
“PartDescPricePerCode”: “E”,
“PartDescTrackSerialNum”: false,
“PartDescPartDescription”: “Part A”,
“PartDescTrackDimension”: false,
“PartDescSalesUM”: “ea”,
“PartDescIUM”: “ea”,
“PartDescSellingFactor”: “1.00000000”,
“PartDescTrackLots”: true,
“InvtyUOM”: “ea”,
“AvailSerialNumbers”: false,
“FirmDate”: “2017-11-17T22:23:08.860Z”,
“FromPlantDesc”: “Plant A”,
“ToPlantDesc”: “Plant B”,
“StageWhseCodeDescription”: “Warehouse 03”,
“WarehouseCodeDescription”: “Warehouse 03”,
“RowMod”: “A”
}

Error =

Epicor.RESTApi.ErrorHandling.ApiException: Order has been shipped, cannot add.

at Epicor.RESTApi.DataSources.IceServiceCaller.UpdateItem(TypeData typeData, ContextInfo context, IceTableset updExtDs) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.RESTApi\DataSources\IceServiceCaller.cs:line 151
at Epicor.RESTApi.ODataHelpers.v3.DataSourceProvider.Update(TypeData typeData, ContextInfo context, IEdmEntityObject entity) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.RESTApi\ODataHelpers\v3\DataSourceProvider.cs:line 197
at Epicor.RESTApi.ODataHelpers.v3.DataSourceProvider.Create(TypeMapping typeMapping, ContextInfo context, IEdmEntityObject entity, IEdmType edmType, IQueryOptions options) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.RESTApi\ODataHelpers\v3\DataSourceProvider.cs:line 107
at Epicor.RESTApi.Controllers.HandleOdatav3Controller.Post(IEdmEntityObject entity, ODataPath odataPath) in c:_Releases\ICE\3.1.600.0\Source\Framework\Epicor.RESTApi\Controllers\HandleOdatav3Controller.cs:line 171
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
— 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.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.Filters.ActionFilterAttribute.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__5.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.Filters.ActionFilterAttribute.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.Filters.ActionFilterAttribute.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Filters.ActionFilterAttribute.d__5.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.Filters.ActionFilterAttribute.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.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.Filters.AuthorizationFilterAttribute.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.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__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.HttpServer.d__0.MoveNext()

hello @NickTu where u able to resolve this issue ? , We are also facing the same currently.