I have a Method Directive set up that sends an email containing a list of parts each time a new sales order is created based on a couple of conditions.
The BPM works fine.
There’s a new request now to not only send the email but to also print the contents of the email to a network printer. We already have the printer set up and we have another BPM that prints to it so that’s all set up and working.
My question is: there is no Auto-Print widget in Method Directives and even if there was one, I don’t think I’d be able to use it to print the contents of the email. The contents of the email contains variables and a tableset variable (the list of parts).
So how can I achieve this? Is there a way to use custom code perhaps?
I’d be more inclined executing a report from a Function then calling that function from the method directive. Should be plenty of posts here about that topic.
EDIT - (due to the fact I don’t make any sense speaking in my antipodean tongue)
Passing in all the required parameters to the function from the call in the BPM.
We’ll need a trace of you printing it to the printer you want it to print to, unless you just want it to pop up as a preview. A preview is my preference, and is super simple.
While @klincecum continues to help you I’d like to go back and ask the question that we always ask for requests like this.
What business problem are you trying to solve? Mostly to understand if there are better options for you and so that others in the future can understand what the need was and if it helps them