The error below that I am getting is confusing me because what do I need to âCastâ when Iâm only dealing with booleans and they are lowercase?
Server Side Exception
BPM runtime caught an unexpected exception of 'InvalidCastException' type.
See more info in the Inner Exception section of Exception Details.
Exception caught in: Epicor.ServiceModel
Error Detail
============
Description: BPM runtime caught an unexpected exception of 'InvalidCastException' type.
See more info in the Inner Exception section of Exception Details.
Program: RefEmit_InMemoryManifestModule
Method: lambda_method
Original Exception Type: InvalidCastException
Framework Method: SetValue
Framework Line Number: 126
Framework Column Number: 13
Framework Source: SetValue<TValue> at offset 73 in file:line:column C:\_Releases\ICE\ICE3.2.100.6\Source\Shared\Framework\Epicor.ServiceModel\Ice\Tableset\PropertyIceColumn.cs:126:13
Server Trace Stack: at lambda_method(Closure , Object , Object )
at Ice.PropertyIceColumn.SetValue[TValue](Object row, TValue value) in C:\_Releases\ICE\ICE3.2.100.6\Source\Shared\Framework\Epicor.ServiceModel\Ice\Tableset\PropertyIceColumn.cs:line 126
at Ice.DynamicColumnValues.SetIceColumnValueOrDynamicValue(IDynamicColumnValues row, String columnName, Object value) in C:\_Releases\ICE\ICE3.2.100.6\Source\Shared\Framework\Epicor.ServiceModel\Ice\Tableset\DynamicColumnValues.cs:line 235
at Epicor.Data.TempRowBase.set_Item(String columnName, Object value) in C:\_Releases\ICE\ICE3.2.100.6\Source\Shared\Framework\Epicor.ServiceModel\Data\TempRowBase.cs:line 31
at Epicor.Customization.Bpm.BOA011D23E27D442A1BB3678072A2A6C0D.UpdatePreProcessingDirective_COILID_CycleCountReset_FA3063C7C95E23B2E611F9A8F93610D8.A002_CustomCodeAction()
at Epicor.Customization.Bpm.BOA011D23E27D442A1BB3678072A2A6C0D.UpdatePreProcessingDirective_COILID_CycleCountReset_FA3063C7C95E23B2E611F9A8F93610D8.ExecuteCore()
at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in C:\_Releases\ICE\ICE3.2.100.6\Source\Server\Internal\Lib\Epicor.Customization.BPM\DirectiveBase.Generic.cs:line 131
Client Stack Trace
==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Ice.Proxy.BO.UD40Impl.Update(UD40DataSet ds)
at Ice.Adapters.UD40Adapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Script.ResetCycleCount()
Inner Exception
===============
Specified cast is not valid.
I donât have a dev machine handy, but adUD40.GetByID returns a UD40TableSet and the code below is trying to assign it to a variable âanswerâ which is declared as a bool.
Your Error is coming from a BPM, not from your code on the screen
Look at the stack trace
at Epicor.Customization.Bpm.BOA011D23E27D442A1BB3678072A2A6C0D.UpdatePreProcessingDirective_COILID_CycleCountReset_FA3063C7C95E23B2E611F9A8F93610D8.A002_CustomCodeAction()
at Epicor.Customization.Bpm.BOA011D23E27D442A1BB3678072A2A6C0D.UpdatePreProcessingDirective_COILID_CycleCountReset_FA3063C7C95E23B2E611F9A8F93610D8.ExecuteCore()
Looks like you have a PreProcessing BPM called COILID_CycleCountReset which is casting something which Iâm guessing you arenât passing.