Folks,
I’m creating a UBAQ to approve or reject requisitions using an updateable dashboard. Using advanced BPM Update, on Update (Base processing) in custom code I call getbyid change 5 fields and call update. I receive following error during testing…
System.ArgumentNullException: Value cannot be null.
Parameter name: fromItem
at Epicor.Data.BufferCompare.Compare[TTypeFrom,TTypeTo](TTypeFrom fromItem, TTypeTo toItem, List1 usingList, List
1 exceptForList, List1 resultsList) in C:\_releases\ICE\ICE4.1.200.3\Source\Shared\Framework\Epicor.ServiceModel\Data\BufferCompare.cs:line 265 at Erp.Services.BO.ReqSvc.ReqHeadBeforeUpdate() in C:\_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\Req\Req.cs:line 2081 at Ice.Services.Trace.TablesetProfilingCollector.DoRowEventTrace(String tableName, String methodName, Int32 rowCount, Action action) in C:\_releases\ICE\ICE4.1.200.0\Source\Server\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 140 at Ice.TablesetBound
3.UpdateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow updatedRow, IceRow originalRow, IColumnUncensor uncensor, TablesetProfilingCollector parentTraceCollector) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1282
at Ice.TablesetBound3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:\_releases\ICE\ICE4.1.200.0\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 979 at Ice.TablesetBound
3.InnerUpdate[TUpdater](IceDataContext dataContext, TFullTableset tableset) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Framework\Epicor.Ice\Services\TablesetBound.cs:line 871
at Erp.Services.BO.ReqSvc.Update(ReqTableset& ds) in C:_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\Req\Req.Designer.cs:line 1559
at Epicor.Customization.Bpm.MethodCustomizationBase22.RunDirectives(TParam parameters) in C:\_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\MethodCustomizationBase2.cs:line 179 at Epicor.Customization.Bpm.CustomizationBase2
2.Execute(TParam parameters) in C:_releases\ICE\ICE4.1.200.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 87
at Epicor.Customization.Bpm.BO.ReqSvcCustomization.Update(ReqTableset& ds)
at Erp.Services.BO.ReqSvcFacade.Update(ReqTableset& ds) in C:_releases\ERP\ERP11.1.200.0\Source\Server\Services\BO\Req\ReqSvcFacade.cs:line 1752
at Epicor.Customization.Bpm.Ubaq.UpdateBaseDirective_UBAQ_Approve_Reject_Req_6C047FF514B94EADBC25A6389AC2F900.A001_CustomCodeAction()…
Here a snippet of my code…
using (var ReqBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.ReqSvcContract>(Db))
{
if(Response == "Approve")
{
var ts = ReqBO.GetByID(ReqNum);
ts.ReqHead[0].NextActionDesc = "Approve";
ts.ReqHead[0].NextActionID = "002";
ts.ReqHead[0].ReplyOption = "A";
ts.ReqHead[0].ReqUserId = callContextClient.CurrentUserId;
//ts.ReqHead[0].UD_SysRevID = "";
ts.ReqHead[0].RowMod = "U";
ReqBO.Update(ref ts);
}
}