Method Directive - Setting Field

Hello All,

New to this forum.

Basically require a little assistance with the last bit of a BPM (Pre Processing).

What I would like to achieve is once the data is submitted in the JOB.MTL table I would like to update the JOB.OPER table in the field QtyPer (Qty/Parent) ONLY where the OpCode = “MAT” with the following result from the JOB.MTL data formula.

(QtyIncSet_C / Parts Per Block_C) / ProdQty

Post Processing BPM on JobEntry.Update
Where JobMtl has been Add / Changed

Then you’d have to write some custom C# code (or use the workflow items to call the BO’s to update the appropriate JobOpr) the code would look something like this (mind you I am not syntax checking this… but it should get you close)

foreach(var jm in ttJobMtl.Where(r=>r.Updated()||r.Added())
          var jo = (from jobOpr in Db.JobOper where jobOpr.Company == jm.Company && jobOpr.JobNum == jm.JobNum && jobOpr.OpCode =="MAT" select jobOpr).FirstOrDefault();
                //Do your formula work and assignment here

Awsome yeah, I had a feeling that you would need to enable post prossessing and invoke bo it was more the coding.

Thanks for your help & time Jose - greatly appreciated