With this code I get the following error if I don’t comment out the Update line:
The publish message lines were added to simply make sure that the variables are populating with the correct information and putting it on the correct line (they are).
Any ideas why I would get the invalid revision number and rev description required errors when those are filled out?
Not sure what you want me to wrap the code in. I used the three tick marks when posting the code to separate it so not sure what more to do or how to do it.
I should have been clearer when first posting thought that the ChildParts.Part table is one I’m creating and filling that is pulling the part numbers of those that I need to create a revision for. I’m attempting to get a new part revision, populate the information for it, and then update this part. Is there something I’m missing?
How do you create loops using widgets. I’m assuming you are saying there is a way to do for type of loops because if you are talking about just pointing widgets in a circle, wouldn’t that result in an infinite loop?
Don’t you hate when you can’t see the obvious answer… Condition to check and use it to loop… Makes complete sense and not something I should have had to ask.
Now I just have to figure out how to do the widgets to get the result I want.
Have most of what I want to accomplish happening, but I have a small snag I’m hoping someone can help me out on.
I’m wanting certain parts to only allow revisions through this BPM and not directly. I can set up a BPM that stops the GetNewPartRev on those parts, but it also prevents this BPM from creating revisions. Is there a way to disable / re-enable a BPM from another BPM? Is there a way to have a BPM that prevents users from creating revisions but allows another BPM to do it? My assumption (which could be wrong) is that if I tried to limit it by user, it would also prevent the BPM because I assume BPMs run as the current user. Is that right? Is there another way around to prevent changes not coming from this BPM?
When I put in the info message, it is called by Erp.UI.Eng.WorkBenchEntry. This is the same regardless of whether it is called through the BPM or directly through the Engineering Work Bench, so this will not work as it doesn’t allow me to determine whether they are adding the revision through the Work Bench or the BPM is attempting to add it.
Maybe add a condition that checks the part numbers that you want then?
Or some other way (a custom UD column) that identifies the parts to be allowed to create new revisions?
E.g. Part.AllowNewRevisions_c
With regards to allowing this to work in BPM and manually, perhaps do this in a Post-Processing BPM with a condition that checks if it has been enabled from a pre-processing BPM?
Again in the Pre-Processing BPM you would need some form of identifier to know which part is allowed. Then you would enable the Post-Processing BPM via the Pre. Although you’d have to figure out the exact functionality yourself.
I’ve checked the Assembly Name, the Process ID, Client Type, Current User, and CGC Code and all are the same whether it is called by the user in the engineering work bench or called by the BPM.