Calling labor methods from BPM

,

I have a post-proc method directive on Labor.Update where I want to take the value in a custom field, recall the labor transaction from Time and Expense Entry, put this value in LaborDtl.BurdenHrs, and Update the Labor record. When I traced the steps to do this from the front end it had: Retrieve the TE Entry record (GetByID), RecallFromApproval, Update, and SubmitForApproval (which I’ll add after I get this part working). My current setup actually updates the labordtl record with the proper value and all other associated data (like on the job) gets updated accordingly. Yay! However, I’m still getting this error below. I don’t know what I’m missing but I have a hunch it’s in my “Row Mod Update” widget.

image

The code in that widget is:

var LaborDataSet = new Erp.Tablesets.LaborTableset();
LaborDataSet = Lbr.GetByID(LaborHedSeq);

foreach (var LaborRow in LaborDataSet.LaborDtl)
  {
    if (LaborRow.LaborDtlSeq == LaborDtlSeq)
      {
        LaborRow.RowMod = "U";
        LaborRow.TimeStatus = "E";
        LaborRow.BurdenHrs = CurBurdenHrsTemp;
        Lbr.Update(ref LaborDataSet);
      }
  }

Any thoughts? :grimacing: