Rma did not change state from Processing to Completed!

Hi,

I’m trying to approve an RMA with erp connect, but I get the following error:

2022-04-25 10:15:46.3794 [App:02] [c8d25c3c-f353-452b-a822-afa09fefa5b5] [ERROR] [] Could not complete Rma - Rma with id aa69bcaa-67c0-4691-ae59-9c3b43db610d could not go to complete because of this error Value cannot be null.
Parameter name: source. 
2022-04-25 10:15:46.3794 [App:02] [c8d25c3c-f353-452b-a822-afa09fefa5b5] [ERROR] [] Litium.IWebLog - Rma aa69bcaa-67c0-4691-ae59-9c3b43db610d did not change state from Processing to Completed! System.Exception: Rma aa69bcaa-67c0-4691-ae59-9c3b43db610d did not change state from Processing to Completed!
   at Litium.Connect.Application.Erp.RmaServiceImpl.VerifyState(Rma rma, RmaState newState)
   at Litium.Connect.Application.Erp.RmaServiceImpl.SetState(Guid systemId, Int16 state)
   at Litium.Connect.Application.Erp.RmaServiceImpl.ApproveRma(Guid systemId)
   at Litium.Connect.Application.Erp.Controllers.Rmas2Controller.ApproveRma(Guid systemId)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(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.<InvokeActionAsyncCore>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.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__17`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.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>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.Controllers.ActionFilterResult.<ExecuteAsync>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.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.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.<ExecuteAuthorizationFilterAsyncCore>d__3.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__6.MoveNext()

RMA:

{
    "id": "aa69bcaa67c04691ae599c3b43db610d",
    "returnSlipId": "4418303",
    "createdAt": "2022-04-25T10:12:01.9997055+02:00",
    "updatedAt": "2022-04-25T10:12:01.9997055+02:00",
    "receivedByPersonId": "00000000000000000000000000000000",
    "approvedByPersonId": "00000000000000000000000000000000",
    "state": "Processing",
    "approvalCode": "None",
    "rows": [
        {
            "id": "7c49be83ab114c5a871188173098f7d5",
            "articleNumber": "165661-110-100",
            "quantityReturned": 1.00000000,
            "quantityReceived": 0.00000000,
            "unitOfMeasurementId": ""
        }
    ]
}

What am I doing wrong?

Litium version: 7.6.2

The error is from the StateTransition in the Accelerator (RmaStateBuilder). Could you debug it locally and catch the full stack trace for the exception? It seems building the SalesReturnOrder from the RMA throws an error.

Ah okey, couldn’t make that out from the exception. We have some custom code which throws the error. Thank you!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.