Hello,
We are getting an error and it seems to be on PartBin doing something with FSA (which we do not use). We see this during the day at times but when MRP runs it just fills the server logs. Any help on where to begin the search would be appreciated in a BPM or Data Directive.
Part 1
System.InvalidOperationException: The cast to value type ‘System.Boolean’ failed because the materialized value is null. Either the result type’s generic parameter or the query must use a nullable type.
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader1.GetValue(DbDataReader reader, Int32 ordinal) at lambda_method(Closure , Shaper ) at System.Data.Entity.Core.Common.Internal.Materialization.Coordinator
1.ReadNextElement(Shaper shaper)
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper1.SimpleEnumerator.MoveNext() at System.Linq.Enumerable.Single[TSource](IEnumerable
1 source)
at System.Data.Entity.Core.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues)
at System.Data.Entity.Core.Objects.CompiledQuery.Invoke[TArg0,TArg1,TArg2,TArg3,TResult](TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3)
at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass35_15.<Compile>b__3(TContext c, Func
5 query) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 1146
at Epicor.Data.DBExpressionCompiler.GetResult[TContext,TQuery,TResult](Func3 executeQuery, Cache cacheSetting, TContext dataContext, TQuery query) in C:\_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 445 at Epicor.Data.DBExpressionCompiler.InvokeSingle[TContext,TQuery,TResult](Expression expression, Cache currentCacheSetting, Boolean cacheQuery, TContext dataContext, Func
2 getDataCacheKey, Func2 compileQuery, Func
3 executeQuery) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 306
at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass35_05.<Compile>b__0(TContext context, TArg1 arg1, TArg2 arg2, TArg3 arg3) in C:\_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 1139 at Erp.Internal.SI.FSA.FSA_Trg.FindFirstWhseBinFSAFlag(String company, String warehouseCode, String binNum) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Internal\SI\FSA\Trg\FSA-Trg.Queries.cs:line 147 at Erp.Internal.SI.FSA.FSA_Trg.GetPartBinSendToFSAFlag(String company, String partNum, String warehouseCode, String binNum) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Internal\SI\FSA\Trg\FSA-Trg.cs:line 113 at Erp.Triggers.PartBin.WriteTrigger.Write(PartBin PartBin, PartBin OPartBin) in c:\_Releases\ERP\RL10.2.200.0\Source\Server\Db\Triggers\PartBin\Write.cs:line 117 at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in C:\_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 296 at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in C:\_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 157 at Ice.Triggers.TriggerQueue.<>c__DisplayClass11_0.<RunWriteTrigger>b__1() in C:\_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 148 at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func
1 buildTriggerRunState, Action action) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 83
at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 572
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 501
at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in C:_Releases\ICE\ICE3.2.200.31\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 329
at Erp.Internal.Lib.ProcessDeferredUpdates.UpdPQDemandCore() in c:_Releases\ERP\RL10.2.200.0\Source\Server\Internal\Lib\DeferredUpdate\ProcessDeferredUpdates.cs:line 516
Part 2 -
Followed by this message
Query failed to run
The cast to value type ‘System.Boolean’ failed because the materialized value is null. Either the result type’s generic parameter or the query must use a nullable type.
(ctx, company_ex, warehouseCode_ex, binNum_ex) => ctx.WhseBin.Where(row => (((row.Company == company_ex) AndAlso (row.WarehouseCode == warehouseCode_ex)) AndAlso (row.BinNum == binNum_ex))).FirstOrDefault().SendToFSA