JonEntry BPM FinalOp C#

Hi, I need your help. Might be anyone has an idea what is wrong.
I have a task to set FinalOp and AutoReceive for the last operation when Released changes to true.
I use BPM method pre processing Erp.BO.JobEntry.ChangeJobHeadJobReleased. Inside a have script (replicated from trace):

var svc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobEntrySvcContract>(Db);
var finalo = svc.GetByID(job);
int rowCount = finalo.JobOper.Count;
//finalo.JobOper[rowCount - 1].AutoReceive = true;
finalo.JobOper[rowCount - 1].FinalOpr = true;
finalo.JobOper[rowCount - 1].RowMod = "U";
svc.ChangeJobOperAutoReceive(true, ref finalo);
svc.Update(ref finalo);

The issue that this works with original operations, but i get error if last operation is manually added:
image

You will need to make a copy of the JobOper row before changing the data and then pass both to the Update. It’s explained in this post: