For anyone this might help, my final, working, code is here:
//SF_JobFirmer
if ( (from t in ttSysTask where t.TaskDescription.Equals("Process MRP") && t.ProcessID.Equals("MRP Reg") select t).Any() ) //MRP Just Ran, called by process set "MRP Reg"
{
using (CallContext.Current.TemporarySessionCreator.SetCompanyID("RDCAN").Create() )
{
using (var txScope = IceContext.CreateDefaultTransactionScope() )
{
Ice.Diagnostics.Log.WriteEntry(Session.UserID.ToString());
DateTime futureDate = DateTime.Today.AddDays(30);
var job = (from jh in Db.JobHead
join jp in Db.JobProd on jh.JobNum equals jp.JobNum
join rl in Db.OrderRel on jp.OrderNum equals rl.OrderNum
join oh in Db.OrderHed on rl.OrderNum equals oh.OrderNum
where jp.OrderNum > 0 &&
jp.WIPQty > 0 &&
jp.OrderNum == rl.OrderNum &&
jp.OrderLine == rl.OrderLine &&
jp.OrderRelNum == rl.OrderRelNum &&
jh.JobEngineered == true &&
oh.OpenOrder == true &&
oh.ReadyToFulfill == true &&
rl.OpenRelease == true &&
rl.FirmRelease == true &&
rl.ReadyToFulfill == true &&
oh.RequestDate <= futureDate
select jh);
foreach (var j in job)
{
if ( (j.JobFirm == false) )
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<JobStatusSvcContract>(Db);
var ds = bo.GetByID(j.JobNum);
//create Before image
var origRow = ds.JobHead.NewRow();
BufferCopy.Copy(ds.JobHead[0], origRow);
ds.JobHead.Add(origRow);
//update record
string jobNum = j.JobNum;
ds.JobHead[0].ToFirm = true;
ds.JobHead[0].RowMod = "U";
bo.ChangeJobHeadFirm(true,jobNum, ref ds);
ds.JobHead[0].RowMod = "U";
ds.JobHead[0].JobFirm = true;
ds.JobHead[0].ExtUpdated = true;
bo.MassUpdate(ref ds);
}
}
txScope.Complete();
}
}
}