How to delete Petty Cash Entry (PCashDoc) with no value (Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: Object reference not set to an instance of an object.)

how to delete Petty Cash Entry (PCashDoc) with no value

select Draft,* from PCashDoc where Company='01' 
--and YEAR(ApplyDate)=2023 and month(ApplyDate)=5 
and ApplyDate=N'2023-05-18' and len(LegalNumber)=0

because PCashDoc has no value so when printing it gives this error




Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: Object reference not set to an instance of an object.
Stack Trace:
at Erp.Internal.AP.PettyCashDayBookPrint.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:_Releases\ERP\UD10.2.300.11\Source\Server\Internal\AP\PettyCashDayBookPrint\PettyCashDayBookPrint.cs:line 399
at Ice.Core.TaskBase`1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_Releases\ICE\ICE3.2.300.11\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 44
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_Releases\ICE\ICE3.2.300.11\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 93
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_Releases\ICE\ICE3.2.300.11\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 57
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in c:_Releases\ICE\RL3.2.300.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in c:_Releases\ICE\RL3.2.300.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 577

after i update the ApplyDate date is different from the date i want to print, the error is not there anymore but i want to delete this from the epicor screen but i don’t know what to do because pressing the voice button doesn’t see any event happening

update PCashDoc set ApplyDate='2023-05-23', CreateDate='2023-05-23' where Company='01' and ReferenceNum=331

:thinking: :thinking:
Thank you! Have a nice day! :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

As, this is not posted, try deleting it

1 Like