Labor Dtl is not being recorded

We have a situation that pops up periodically in our production area where the LaborDtl record is not updated when the folks process a unit. It happens maybe once every 10 days or so and we do nothing to fix it but the next day, or later the same day, it works again. I’m not sure if I have a hardware, software or maybe even a network issue. Just thought I would ask and see if any of you have had issues such as this. The following is a snippet of the code. Can any of you see anything wrong with it or know of any measures I can take to improve this?

var LaborHedSeq = Convert.ToInt32(laborList.Tables[0].Rows[0][“LaborHedSeq”]);

oTrans.PushStatusText(“Checking for Active Transaction.”, false);
var labor = WCFServiceSupport.CreateImpl((Session)oTrans.Session, ImplBase.UriPath);
var laborDS = labor.GetByID(LaborHedSeq);

labor.StartActivity(LaborHedSeq, “P”, laborDS);
labor.DefaultJobNum(laborDS, jobNum);
labor.DefaultOprSeq(laborDS, Convert.ToInt32(oprSeq), out msg);

labor.DefaultLaborQty(laborDS, currentQty, out msg);
oTrans.PushStatusText(“Saving production activity.”, false);

The labor.Update(laborDS) is what is timing out.

A few things I would look at:

  • setting the fields: set the field to the new value and then call the method (for job num, oper, assembly, etc).

Instead of:
labor.DefaultJobNum(laborDS, jobNum);

try something like:
laborDS.LaborDtl[0].JobNum = jobNum;
labor.DefaultJobNum(laborDS, jobNum);

  • did you miss any methods (for example, I see Labor.LaborRateCalc in my trace logs at least once)

  • I don’t see anything related to RowMod (maybe you don’t need it but I would double-check that)

Thank you. I will look at that.