We have one supplier who’s POs will not approve due to an error. It is a foreign supplier and this seems to be the only supplier that it is happening to. We were able to approve it once, but days after it was approved our buyer went in and changed the unit price and tried to re-approve. This is when we are seeing the error.
I made a brand new PO with a different supplier and tried to link it to the sales order line. It still threw the same error. I will put the client stack trace below.
This is the client stack trace. I still have yet to go to the server.
Exception caught in: Epicor.ServiceModel
Error Detail
Message: Object reference not set to an instance of an object.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Erp.Services.BO.POSvc.POHeaderBeforeUpdate() in C:_Releases\ERP\UD10.1.500.12\Source\Server\Services\BO\PO\PO.cs:line 17427
at Ice.Services.Trace.TablesetProfilingCollector.DoRowEventTrace(String tableName, String methodName, Int32 rowCount, Action action) in C:_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 144
at Ice.TablesetBound3.UpdateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow updatedRow, IceRow originalRow, TablesetProfilingCollector parentTraceCollector) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1149 at Ice.TablesetBound3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 895
at Ice.TablesetBound3.InnerUpdate(IceDataContext dataContext, TFullTableset tableset) in C:\_Releases\ICE\3.1.500.12\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 805 at Erp.Services.BO.POSvc.Update(POTableset& ds) in C:\_Releases\ERP\UD10.1.500.12\Source\Server\Services\BO\PO\PO.Designer.cs:line 4189 at Erp.Services.BO.POSvcFacade.Update(POTableset& ds) in C:\_Releases\ERP\UD10.1.500.12\Source\Server\Services\BO\PO\POSvcFacade.cs:line 2311 at SyncInvokeUpdate(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in C:_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 47
at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:_Releases\ICE\3.1.500.12\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.POImpl.Update(PODataSet ds)
at Erp.Adapters.POAdapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Erp.UI.App.POEntry.Transaction.Update()
How can I find that server line? That has always been a mystery. I looked at the event in the app server, but the detail is the same as the one I posted. Contacted support, but I am trying to dwindle it down for them because it is such a broad issue. I am starting to think it could be due to the part.
That’s source code we use internally to isolate where things died. For example -
17426 bOrderDtl = FindFirstOrderDtl(PORel.Company, PORel.BTOOrderNum, PORel.BTOOrderLine);
17427 if (bOrderDtl != null && bOrderDtl.GroupSeq > 0)
Stack traces are more for triaging and escalating internally then anything you can solve in a deployment. Possibly there is a work around we can give you to avoid the error but fundamentally there is a bug. Even if the fix is *hey you are missing field ‘x’ on row ‘y’ something is needed instead of Object Reference Error
I see, well after some testing I found out that the error is coming from a PO line that is referencing a configured part which is of type “purchased.” In the Configurator Technical Reference Guide you cannot make a part configurable and “part type” Purchased. This results in the object reference not set to an instance of an object when the order line generates a PO suggestion and the suggestion is flipped into a PO. I was on the phone with Epicor yesterday and they were testing it on their end as well which resulted in this error.