Are Epicor Widgets Broken? 🤐

@SAD just wanted to throw this out for reference.

If you use Client WCF it actually handles the BeforeImage and stripping everything out from the dataset.

If you invoke a BO from a BPM it doesnt handle BeforeImage and it also sends the entire dataset to your PRE BPM:

using (var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.ReceiptSvcContract>(this.Db))
{
   var dsReceipt = bo.GetByID(vendorNum, purPoint, packSlip);
   int seqNum = GetReceiptLCMiscChargeSeq(Session.CompanyID, vendorNum, purPoint, packSlip);
   var row = dsReceipt.RcvMisc.Where(x => x.MiscSeq == seqNum).FirstOrDefault();
   row.RowMod = IceRow.ROWSTATE_UPDATED;
   bo.OnChangeMiscDocActualAmt(vendorNum, purPoint, packSlip, seqNum, 10.00, ref dsReceipt);
   bo.Update(ref dsReceipt);
}

Which makes calling a Business Object from a BO sometimes tricky. Nontheless. I wonder if Epicor Functions can use the BO.Proxy or if someone who calls multiple BO’s in a eFX needs to really, really know what theyre doing (havent tried yet).
image

1 Like