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.
I’m not sure where to start looking for which BO and method updates PrintAs on the PO header; “Update” doesn’t seem to be called when print preview is hit.
It seems like it’s changed by the actual printing process, but I’d rather not tack on logic to the Report Monitor since it’s not related to PO Headers directly. Is there a better place to look?
I’ve listed a few methods below, but they seem to be read only (I would think) so I’m not sure where the value for PrintAs is written.
The method for getting which parameters to use on the SSRS report?
Erp.Proxy.Rpt.POFormImpl
GetNewParameters
return Erp.Tablesets.POFormTableset
I’m not totally sure which one this is
Erp.Proxy.Rpt.POFormImpl
GetRptArchiveList
return System.String
The method to actually put the form onto the report queue?
Erp.Proxy.Rpt.POFormImpl
SubmitToAgent
return System.Void
The method to refresh the menu maybe?
Erp.Proxy.BO.POImpl
GetByID
To start add the action to an in-transaction data directive to see PrintAs to “N” without any conditions. I made this and printed a few times and PrintAs stays New.
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.