Try double clicking on a row, that should change it to yellow, (if it doesn’t you might have to add a check box or something to give you something to change) then run your custom actions, then click update.
edit: I don’t think that will work either. Like @knash said, you are setting your TT fields, but trying to update the DS that you got, so they aren’t the same.
Here is my BPM. I think it is setup correctly based on what I have read, and what you all have said.
It runs ok, but doesn’t update the record. I am going to have to sleep on this for another day.
Does that work? Sometimes, the BO that does the change updates the database. You will need to test that out.
If the database table isn’t updated thenAdd two more widgets to update the tsJobs.RowMod = “U” and then one to run the BO Erp.JobEntry.Update
If you are good to go then do that again with the JobOper. By doing this in steps you will learn how the BO work and what is all going on when you make the calls.
Knowing the trace and then creating the BPM to mimic the trace is an acquired skill, you might drive yourself mad, but you will get there.
Good morning,
Thank you for taking time to work this out with me. I replicated the TEST method you showed. I keep coming up to the same error when running the ChangeJobOpDtlResourceGrpID method.
Operation Detail is not available.
Could there be something locking up my op detail? Based on Ruth’s input earlier, I also tried to add a method to Change Job Engineering and Released, but these also fail with an error.
Job has not changed.
For clarity, I am not using the callcontextBPM yet, just a hard coded value. Eventually when this BPM is run from my customized dashboard, then I will pass in the callcontext fields that are set by the user.
The resource group ID is valid. I can change the value in the JobEntry form. That is how I did the trace. Do you mean in JobEntry, or in the BAQ? I would have to switch from ‘Advanced BPM Update only’ to ‘BPM update’ if I want to test the BAQ that way. I’ll take a look at that approach next, but from memory I believe we did have problems setting the ResGrpID from the UBAQ screen.
Are you using GetDataSetForTree()? that’s the one that is going to get the data set that you need.
That method will let you populate the JobEntryDataSet with just the asm seq you want. Which makes more sense when the changes only take the change, and not which one needs to be changed.
In the trace utility, compare that method to itself, you should be able to see what was added.
When I compare the first GetDatasetForTree method to itself I found a few values changed. I assume some method calculates the values for these. I am not sure how I would figure them if I had to update these values myself. Do I need to run UpdateTableByQuery for all these tables/values?
Yes. First, I set op40 resourcegrpid to “4AAA”. This is the only job/op with this resourcegrpid. For the trace I changed it from “4AAA” back to “12VA”, an existing resourcegrpid that is used for many jobs/ops.
I keep thinking that something is preventing me from getting at the job operation details to update that field. When I run the UBAQ without advanced directives, and just update it through the BAQ form, I get:
Severity: Exception, Table: JobOpDtl, Field: , RowID: 916f4ab9-fe90-48d3-adba-500bc02ca607, Text: Object reference not set to an instance of an object.
ok based on the trace we need to update the tsJobs object.
Note that we are changing to Depot on JobOpDtl OprSeq 10, see the RowMod. We need to set that to U. Using the same process we were trying to do before.