Change operation primary prod and setup resource group IDs via Function

Hello all,

Has anyone had any luck changing the primary prod and setup resource groups on a job’s (open or otherwise) operations in an Epicor Function? I’m using the available BO methods ChangeJobOperPrimarySetupOpDtl and ChangeJobOperPrimaryProdOpDtl just like I’ve traced. I receive no errors, but nothing is written to the database.

Some pseudo-code of what I’m doing:

this.CallService<Erp.Contracts.JobEntrySvcContract>(js => {
  JobEntryTableset jobEntry = js.GetDatasetForTree('1111', 0, 0, false, "MFG,PRJ,SRV");

  JobOpDtlRow opDtl = jobEntry.JobOpDtl[0];
  JobOperRow opRow = jobEntry.JobOper[0];

  opRow.PrimaryProdOpDtl = opDtl.OpDtlSeq;
  opRow.RowMod = "U";  
  
  js.CheckJobOperPrimaryProdOpDtl(ref jobEntry, nonPrimaryOpDtl.OpDtlSeq);              
  js.ChangeJobOperPrimaryProdOpDtl(ref jobEntry);
}); 

This is a simplified version of what I’m trying to accomplish, since there is additional logic involved in actually identifying what operation and what operation detail record to use. Regardless, the ChangeJobOperPrimaryProdOpDtl (and the Setup version) appears to complete and throws no errors, but the change is never written to the database. If I call js.Update(ref jobEntry), it throws a Cannot manually update the Production Labor Rate in JobOper` error. The trace shows no call to Update.

I was able to update these fields manually with a transaction, but I know that this is not the best way to go about this.

Any help would be appreciated!