I am trying to make a change to a table in Job Entry when another table in Job Entry is edited. More specifically when any operation is edited (JobOper table) I want to set overriderates to true on the JobOpDtl table.
For now I am just looking at editing the OverRideRates value to true and I will get to the condition later.
After doing a trace i can see that I need to set the OverRideRates field to true and then call the ChangeJobOpDtlOverrideRates method which takes the dataSet as an input. I did the same in the BPM but it is failing because the JobOpDtl table is missing from the dataset. Note: I set the ds variable in the method call to ds as well.
Hi @bmanners,
you need to determine what parameters JobOpDtl needs to be updated, by default the first one is the RowMod==U, Company, JobNum, OperNum, OpCode, etc, then use Fill table widget to read from ttJobOper table (ds) to fill into JobOpDtl, to invoke the update method, this is how widget should be used, alternatively you can do the same by Custom Code
Edit: also make sure that epicor base script is not overriding your values, if it does, you need to do your BPM at post-process not at pre-process stage.
I think this could get a little complex…if the user edits anything in the JobOpDtl table then it should be in the tt tables, if not I will have to populate it with a fill be query widget.
Our end goal is for the burden labour rate to be zero on certain jobs. I am hoping to set it up so that the users only have to check one checkbox and then the system will do the rest. So my plan was that on JobEntry.Update I will update the OverRideRate and ProdBurdRate fields for any operations on that job.
If the BPM gets too complex I might have to see what other options I have…
you can put a condition to determine what trigger your rate changes, also not every ttvalue will pass to the target table only the one you decide plus the key ones which are required for any Update process any way.
Brett, have you thought about doing a data directive on JobOpDtl instead that queries for your “zero labor” condition and sets the field to zero when that condition is met?
I ended up going the Data Directive option (thanks for the tip Adam). I am guessing by doing this I am by passing some business logic but I just couldn’t get it to work using the BO methods in a method directive.