After printing a Purchase Order, PrintAs is set from “N” to “C” automatically. We’d like to disable this behavior and instead only allow PrintAs to be changed to “C” manually.
I put a message box into a Purchase Order Entry customization on the After Adapter Method that should print the name of the method being used. I can’t put my finger on the right event. I also ran a trace log to see if I could pick up on any method being called that was obviously to set PrintAs to “C”.
Does anybody know the correct event that I could tack a BPM to for cancelling this automatic behavior?
In theory, you could use a data directive on PO but would need some indicator (maybe callContextBpmData field indicator) that this was done manually instead of automatically. Another option would be to add a preprocess method directive to Ice.ReportMonitor.Update so that as the report is done processing, it resets the value on the related PO (but can be a bit trickier to find the PO).
I do something like this for mass print. Add a checkbox to poheader that is set in PO.GetNewPOHeader post processing directive to true. if the checkbox is still true when the data directive fires have it set PrintAs to “N”. Your user would have to uncheck and set print as to changed.
Actual PO Entry shows an update message with the value of PrintAs and the value of the checkbox, which is bound to CallContextBpmData.Checkbox01
When I actually print the document, it seems to lose that BPM Call Context data. This screenshot is after hitting “print preview”. The checkbox remains checked, but there was no update message that popped up, and something updated “PrintAs” to “C”.
It seems odd that the PO Header Update method would be called but no message box would pop up.