Hi All!
The goal is to replace specific Resource Group IDs within part/revision/operations, at the master part level. I am not entirely clear on the correct terminology here. So for me, ‘master part’ is the list of operations in the method tracker. These part revisions may include approved and unapproved revs. Besides the ResourceGroupID, I also need to update the Operation Description field, PartOpr.OpDesc.
The process is to find all parts in the part tables, with operations that utilize a specific Resource Group ID. I call this the OldResGrpID. I pass this through a BAQ parameter into the PartOpDtl table to get my list of rows that need to be changed.
Once the BAQ returns the list of part/rev/ops to update, the BPM takes over. For testing I click the RunCustomAction button. Working through the workflow (attached):
- Set some initial variables.
- Get the part and rev from the next BAQ result row.
- Check out the part to my mass update group, “MU”.
- Check if the part is approved, if so set a flag so we can reapprove it later.
- If part was approved, unapprove it.
- Change the resource group id for the matching part in the mass update group in the ECOOpDtl table.
- If the part was previously approved, reapprove it.
- Check the part back in.
- Loop back to the next line in the BAQ results.
I have tested all of these steps in individual BAQs and BPMs. So I know they work by themselves. Now I am combining all the working pieces together, trying to get them to work with the entire list of BAQ results, not just one, hard-coded, sample.
Right now, my problem is at the first Update method, “Update tsApp1”. Here I try to unapprove an approved part after it has been checked out into my mass update group.
I get the error:
“Update not allowed to visual representation of PartRev record.”
The confusing part is that I don’t think I am trying to update the PartRev table directly, so one of the methods must be tapping into it.
Here is my outline, let me know if you need specifics for the individual widgets.
Has anyone seen that error before? Any ideas how to diagnose it?
Thanks for your time!
Nate