Count Cycle Maintenance gives Object Reference error

I’m getting this error in Count Cycle Maintenance after selecting a cycle. Any ideas on how to trace down the offending field/record?
I’ve tried many things, got a case going with Epicor but so far no luck… Thanks in advance.

Client error:

Application Error

Exception caught in: Epicor.ServiceModel

Error Detail 
============
Correlation ID: 22be7784-f750-4008-9ea8-3ab898ff5640
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.CCCountCycleImpl.GetPeriods(String ipWarehouseCode, Int32 ipYear, String& opPeriodList)
   at Erp.Adapters.CCCountCycleAdapter.GetPeriods(String ipWarehouseCode, Int32 ipYear, String& opPeriodList)

Server side error:

Ice.Common.EpicorServerException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Erp.Services.BO.CCCountCycleSvc.GetPeriods(String ipWarehouseCode, Int32 ipYear, String& opPeriodList) in C:\_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\CCCountCycle\CCCountCycle.cs:line 2651
   at Erp.Services.BO.CCCountCycleSvcFacade.GetPeriods(String ipWarehouseCode, Int32 ipYear, String& opPeriodList) in C:\_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\CCCountCycle\CCCountCycleSvcFacade.cs:line 403
   at SyncInvokeGetPeriods(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\ICE4.1.200.13\Source\Server\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE4.1.200.13\Source\Server\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
   --- End of inner exception stack trace ---

image

Thank you

Things I’ve tried:

  • Replicated the issue on our test database
  • Disabled all customizations
  • Followed steps in these KB articles: KB0119629, KB0050786, KB0088964
  • Deleted and recreated Cycle Count Periods, Schedules, Cycles.
  • Debug script in customization, error occurs after BeforeAdapterMethod GetPeriods but before AfterAdapterMethod GetPeriods. Kind of silly to check this given the error message…
  • Made BPM triggering on CycleCount GetPeriods to look at the variables. Preprocess variables look correct. Postprocess variables look correct. Not sure how else I can see what is going on… possibly some other method is running as a call from GetPeriods?
  • 3 datafixes Epicor has provided to try.

If you’ve recreated all the records then I’m assuming its always happening which is odd. To give insight to your 6th point the method doesn’t look to be doing anything extravagant, it just loops through the Cycle count header records for the warehouse/year, and then checks for a matching cycle count definition to the header returning the description. So if your tables are all populated I’d expect it to work.

Thanks Pete. So I just noticed something - it first tries to load cycle counts from 2022 (there are none), it errors out, then loads 2023. Anyone know where is this errant year might be coming from?
image
image
My other site doesn’t have the 2022 option and works fine.

Found it. There was an incomplete physical count from prior year, hidden unless you checked the box during search.
Terrible, Horrible, No good, Very Bad Object Reference error. Probably cost us $5000 in time.

Edit for others that might run into this -
Root cause appears to be doing a quantity adjustment while a physical inventory count was still open. This prevented the tag from posting and closing out the physical count. Fix was to get FX_Void_CycleCount.df from Epicor support, and cancel out those glitched tags.

One more note - the built in cycle count process is so convoluted that we’re looking at ditching it entirely. Replace it with a simple updateable dashboard, and make any necessary quantity adjustments on the Quantity Adjustment screen. And we can do it by bin instead of part, capture misplaced parts.

1 Like