Part Service error when loading Part into Entry / Tracker

Version: 10.2.300.6

On certain parts in Epicor when we try to open them in Part Entry the part will not open, in Part Entry the part will not open and nothing happens, in Part Tracker we see the following errors being thrown in the client application:

Application Error

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 Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
   at Erp.Proxy.BO.PartImpl.GetByID(String partNum)
   at Erp.Adapters.PartAdapter.OnGetByID(String ID)
   at Ice.Lib.Framework.EpiBaseAdapter.GetByID(String stringId)
   at Erp.UI.App.PartTracker.Transaction.GetByID(String partNum)
Application Error

Exception caught in: System.Data

Error Detail 
============
Message: Index -1 is either negative or above rows count.
Program: System.Data.dll
Method: GetRow

Client Stack Trace 
==================
   at System.Data.DataView.GetRow(Int32 index)
   at Erp.UI.App.PartTracker.Transaction.GetByID(String partNum)
   at Erp.UI.App.PartTracker.Transaction.OnValidateKeyField(EpiTextBox txtbox)
   at Erp.UI.App.PartTracker.PartTrackerForm.partNum_Validating(Object sender, CancelEventArgs e)

When attempting to open the Part in both Part Entry and Part Tracker on the backend we are seeing the following error being thrown:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Erp.Services.BO.PartSvc.AfterGetRows() in C:\_Releases\ERP\UD10.2.300.6\Source\Server\Services\BO\Part\Part.cs:line 807
   at Ice.Services.Trace.TablesetProfilingCollector.DoTablesetEventTrace(String tablesetName, String methodName, Action action) in C:\_Releases\ICE\ICE3.2.300.6\Source\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 198
   at Ice.TablesetBound`3.InnerGetByID(IceDataContext dataContext, Int32 pageSize, Int32 absolutePage, Boolean& morePages, TFullTableset tableset, IEnumerable`1 queryParameters) in C:\_Releases\ICE\ICE3.2.300.6\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 724
   at Erp.Services.BO.PartSvc.GetByID(String partNum) in C:\_Releases\ERP\UD10.2.300.6\Source\Server\Services\BO\Part\Part.Designer.cs:line 5525
   at Epicor.Customization.Bpm.BO3D597DDB8C6E4CA88F72B0B8D0FB39AB.GetByIDImpl.ExecuteBase(GetByIDParameters parameters)
   at Epicor.Customization.Bpm.MethodCustomizationBase2`3.RunDirectives(TParam parameters) in C:\_Releases\ICE\ICE3.2.300.6\Source\Server\Internal\Lib\Epicor.Customization.BPM\MethodCustomizationBase2.cs:line 193
   at Epicor.Customization.Bpm.CustomizationBase2`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE3.2.300.6\Source\Server\Internal\Lib\Epicor.Customization.BPM\CustomizationBase2.cs:line 73
   at Epicor.Customization.Bpm.BO3D597DDB8C6E4CA88F72B0B8D0FB39AB.PartSvcCustomization.GetByID(String partNum)
   at Erp.Services.BO.PartSvcFacade.GetByID(String partNum) in C:\_Releases\ERP\UD10.2.300.6\Source\Server\Services\BO\Part\PartSvcFacade.cs:line 4851
   at SyncInvokeGetByID(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.300.6\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.300.6\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28

Some additional context and info:

  • The part exists in the DB, it can be queried and seen in a BAQ / SQL
  • So far I have not been able to identify anything that stands out as different when comparing Part table entries between the part that throws these errors and a good part
  • You can search for the part and it shows up in the list but opening the part in Entry / Tracker will cause the above errors
  • There are no change logs recorded against the part in over a year
  • I have disabled all custom BPM’s we have on the Part method’s and we still run into the same issue

Hoping someone else has come across this and has a solution or can shed some light on troubleshooting :smiley:

Some of the PlantWhse records for the parts in question have a Plant code that does not match up with the Plant code on the Warehse table which causes the PartSvc to set this.Warehse to null and then it’s never checked before it’s used a bit later.

Still not sure how the bad data got there in the first place or how to go about properly resolving it (other than deleting those records) so that’s going to be the next journey down the rabbit hole.

image