I have a Pre-Processing method directive defined on the JobEntry.Update method that raises an exception if the user checks the Released setting and the part on the job does not have any costs defined for it (no PartCost record, or all the standard costs are zero).
In the classic form, it runs once when checking Released, clicking the Save button and displays the error if the conditions are not met.
In the equivalent Kinetic UI screen, as soon as I check the Released checkbox, the update method fires and shows the error, but then displays it again after I click the OK button on the first error.
When I debugged it, the developer console shows the Update method is being called twice.
Has anybody else run into this? I’m not running any custom layers in the Kinetic UI.
Could you run the BPM on ChangeJobHeadJobRelease instead? It looks like it has the normal 2 rows in the DataSet with an Unchanged Row (RowMod == “”) and Updated Row (RowMod == “U”). That might actually be helpful to your users, because it would fire before requesting the “Changes” text.
This has been my experience as well. Put a Rowmod modifier on your BPM and I bet it only runs once. Generally this is either Rowmod = “A” for added rows, or = “U” for updated rows.
I tried adding a Pre-Processing directive for the ChangeJobHeadReleased method, and it displays the error only once, but it does not revert the change, and it does not prevent you from saving it.
So it runs the BPM and it throws your exception, but it still opens the “Changes” input slide-out and still has Released checked as true when you refresh the screen?
In the classic screen, if I refresh the screen, the Released setting reverts back to unchecked, but if I don’t do so, it remains checked and I can save the change.
In the Kinetic UI, it shows the error, but it still calls the Update method and saves the change.
In both cases, it bypasses the rule that I’m trying to enforce.