Trying to update the PartTran.MtlBurUnitCost field via a Data Directive BPM and getting errors

,

Below is my Data Directive BPM in test mode and the error. Firing from changing a UD14 record just for testing.

I will eventually be firing this from a dashboard. I am trying to change the MtlBurUnitCost for inbound freight because I want to use the actual inbound freight amount after the part is received instead of the percent option in the part or using landed cost.

Please help!

Thanks,

Richard

DateTime dt = DateTime.Parse("2026/08/11");
this.CallService<Erp.Contracts.PartTranSvcContract>(pt =>
 {
    var pts = pt.GetByID(dt, 45390, 540691);
    var rows = pts.PartTran
        .ToList();
  **foreach** (var ptr **in** rows)
  {
        ptr.MtlBurUnitCost = 123.45M;
        ptr.RowMod = "U";
        this.PublishInfoMessage(ptr.PartNum, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "", "");
    pt.Update(**ref** pts);
}
}
);
## System Information

Business Layer Exception

Asm is required.
Type is required.
Pack ID is required.
Order is required.
Line is required.
Rel is required.
Rev is required.
Invoice is required.
Dimension is required.
Fiscal Period is required.
Journal is required.
DMR Number is required.
Action Number is required.
RMA is required.
Journal is required.
Call is required.
Line is required.
Line is required.
Customer is required.
RMA Line is required.
Rcv is required.
Pack Line references invalid value.
PO references invalid value.

Exception caught in: Epicor.ServiceModel

## Error Detail

============

##!Correlation ID:##!  a2d71001-af22-45d6-909d-0aeaf9e56590
##!Message No.:##! 1
##!Description:##!  Asm is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  AssemblySeq
##!Message No.:##! 2
##!Description:##!  Type is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  JobSeqType
##!Message No.:##! 3
##!Description:##!  Pack ID is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  PackNum
##!Message No.:##! 4
##!Description:##!  Order is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  OrderNum
##!Message No.:##! 5
##!Description:##!  Line is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  OrderLine
##!Message No.:##! 6
##!Description:##!  Rel is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  OrderRelNum
##!Message No.:##! 7
##!Description:##!  Rev is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  RevisionNum
##!Message No.:##! 8
##!Description:##!  Invoice is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  InvoiceNum
##!Message No.:##! 9
##!Description:##!  Dimension is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  DimCode
##!Message No.:##! 10
##!Description:##!  Fiscal Period is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  FiscalPeriod
##!Message No.:##! 11
##!Description:##!  Journal is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  JournalNum
##!Message No.:##! 12
##!Description:##!  DMR Number is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  DMRNum
##!Message No.:##! 13
##!Description:##!  Action Number is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  ActionNum
##!Message No.:##! 14
##!Description:##!  RMA is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  RMANum
##!Message No.:##! 15
##!Description:##!  Journal is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  JournalCode
##!Message No.:##! 16
##!Description:##!  Call is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  CallNum
##!Message No.:##! 17
##!Description:##!  Line is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  CallLine
##!Message No.:##! 18
##!Description:##!  Line is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  MatNum
##!Message No.:##! 19
##!Description:##!  Customer is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  CustNum
##!Message No.:##! 20
##!Description:##!  RMA Line is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  RMALine
##!Message No.:##! 21
##!Description:##!  Rcv is required.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateColumn
##!Line Number:##!  256
##!Column Number:##!  17
##!Table:##!  PartTran
##!Field:##!  RMADisp
##!Message No.:##! 22
##!Description:##!  Pack Line references invalid value.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateReferentialIntegrity
##!Line Number:##!  600
##!Column Number:##!  21
##!Table:##!  PartTran
##!Field:##!  PackLine
##!Message No.:##! 23
##!Description:##!  PO references invalid value.
##!Program:##!  Epicor.Ice.dll
##!Method:##!  ValidateReferentialIntegrity
##!Line Number:##!  600
##!Column Number:##!  21
##!Table:##!  PartTran
##!Field:##!  PONum

## Client Stack Trace

==================
at Epicor.ServiceModel.Channels.ImplBase.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
at Epicor.ServiceModel.Channels.ImplBase.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Epicor.ServiceModel.Channels.ImplBase.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Proxy.BO.UD14Impl.Update(UD14DataSet ds)
at Ice.Adapters.UD14Adapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Ice.UI.App.UD14Entry.Transaction.AdapterUpdate()
at Ice.UI.Shared.UDSupport.UDSingleViewTransaction.Update()

Personally, I don’t like to touch tables that aren’t part of the method in Data Directives, I prefer using PostProcessing Method Directives so that the Updates are split out. Especially for multiple records. I could be wrong in my understanding (wouldn’t be the first time), but I believe a Data Directive fires on the table itself and thus can lock itself up if not careful.

Thank you for your reply Marjorie, I did as you suggested and I get the same error. Please Help!

Thanks,

Richard

your code is not correct for this… but also, updating anything in PartTran is very dangerous. It is not a table that is typically maintained, and could cause the GL to get out of balance. It would be better to change the source data before it gets created as a parttran than to modify the parttran table data. While i know HOW to do this correctly, i would be neglegent (as an epicor employee) to tell you how to do this since i believe it will corrupt the data.
SO… i guess this goes back to the old XY Problem.
Instead of asking how to write this code… please tell us what you are attempting to do and why you need to do it. This could be something that is solved another way with data, rather than writing a BPM to “fix” something.

Tackling at the PartTrans layer is a beast. Why not try and make the change upstream at the receipt time?

Else you can always do a cost adjustment. Which then is tracked by PartTran.

End of day PartTran updates are not normal, as you can tell from the responses so far.

Thank you for your reply Tim.

You caused me to rethink my logic and use the Part Table Mtl Burden Unit Cost field. I can average and update it via a dashboard and then the Mtl Burden Unit Cost will be correct whenever a receipt is entered.

Thanks,

Richard