At the top of this?
/* update CoCRequired_c */
Ice.Diagnostics.Log.WriteEntry("start update CoCRequired_c");
SalesOrderSvcContract salesBO = Ice.Assemblies.ServiceRenderer.GetService<SalesOrderSvcContract>(Db);
using (var txscope = IceDataContext.CreateDefaultTransactionScope())
{
SalesOrderTableset salesOrder = salesBO.GetByID(iOrderNum);
foreach (var ttOrderHeadRow in (from ttOrderHead_Row in salesOrder.OrderHed select ttOrderHead_Row))
{
foreach (var ttOrderDtlRow in (from ttOrderDtl_Row in salesOrder.OrderDtl select ttOrderDtl_Row))
{
Ice.Diagnostics.Log.WriteEntry($" In OrderDtl {ttOrderDtlRow.OrderNum} CoCRequired_c {ttOrderDtlRow.UDField<bool>("CoCRequired_c")}");
ttOrderDtlRow.SetUDField<bool>("CoCRequired_c",ttOrderHeadRow.UDField<bool>("COCRequired2_c"));
}
}
salesBO.Update(ref salesOrder);
dsHolder.Attach(salesOrder);
txscope.Complete();
}
Ice.Diagnostics.Log.WriteEntry("End update CoCRequired_c");
Edited