Hello Team,
I Got Some Error during customization on Acumatica 2024 R1, the codes works fine on Acumatica 2021 R2, but when upgrading to Acumatica 2024 R1 it throw error A data corruption state has been detected here simple customization code.
protected virtual void _(Events.FieldUpdated<RQRequisition,RQRequisition.vendorID> e)
{
if (e.NewValue != null)
{
int? vendorID = Convert.ToInt16(e.NewValue);
foreach (var line in Base.Lines.Cache.Cached.RowCast<RQRequisitionLine>())
{
var vendorPrice = GetVendorPrice(vendorID, line.InventoryID, line.SiteID, line.PromisedDate);
decimal lastPrice = vendorPrice == null ? 0m : vendorPrice.SalesPrice ?? 0m;
Base.Lines.Cache.SetValueExt<RQRequisitionLine.curyEstUnitCost>(line, lastPrice);
Base.Lines.Cache.RaiseExceptionHandling<RQRequisitionLine.curyEstUnitCost>(line, null, null);
}
}
}