I’m having trouble with trying to do either a Method Directive or Data Directive. I’m trying to set a PartPlant.RecieveTime to a number if PartOpr.OpCode = ‘WHSE’ The issue I’m facing is the Part, PartPlant, PartRev, tables cannot see the table PartOpr table and therefore I cannot create a criteria to trigger my BPM on both Method directives or Data directives. Does anyone know a solution or work around.
Here is my company’s request: 1. For all Manufactured parts with a single operation of ‘WAREHOUSE ASSEMBLY’, can the Receive time be auto-populated to 14 days?
I’d probably put a post-proc BPM on EngWorkBench.CheckIn method. Might need to also put it in CheckInAll. Depends on whether or not CheckInAll calls CheckIn. I don’t recall if it does. Might want to test that. Placing the BPM on these methods ensures your settings are updated as soon as the new revision goes live.
Within the BPM invoke the BO method Part.GetByID using your eco PartNum as the parameter. The PartPlant record is within the PartTableSet returned by this method.
Change the partplant setting in the PartTableSet object you retrieved from GetByID based on whether or not the “WHSE” opcode is present in your eco data.
Then shove the modified tableset into Part.Update.
You should be able to do all of this in widgets. Just make sure to drop in some condition blocks so you’re not updating Part unnecessarily.
Hello John,
I’m trying to do something similar.
I’m using the Part GetByID BO Method Post-Processing.
I set a field on PartPlant with the “Set Field” Widget.
When I test in Part Entry the change happens to field, it just doesn’t save.
It will save if I manually alter something else on the Sites tab.
How do I “shove the modified tablest into Part.Update” as you state above?
I’m not sure I’d touch a GetById method in a way that would change a record. Those can get called even when records are not in an editable state, or when you don’t want to edit records. It’s a dangerous and tedious method to modify fields.
The typical way to set defaults is on a GetNew method. Those are called only when new rows are created. In my walkthrough above, I used GetById calls within another function or BPM. Which means I’m following it up with other calls to Update to commit the changes made. GetById itself is left alone.