How to Simultaneously Output the Same Document via Email and via Printer

Scenario: The business have made a request for the delivery note to not only be emailed to the M3 user but also to be printed to a particular office printer.

Currently the delivery note (MMS480PF) is emailed to a particular M3 user via the following runtime configuration (Figure 1):

code6
Figure 1: Runtime configuration for an EMAIL-only Delivery Note
  1. Open the Message
  2. Change the name fof the Delivery_Note process to EMAIL_Delivery_Note
  3. Copy the EMAIL_Delivery_Note process
  4. Paste the copied process and rename it Printer_Delivery_Note
  5. Right click on the Printer_Delivery_Note process and select Script…
  6. Insert the following code:

setdestpath("PrinterName"); //for more info on this click here

  1. Open the Runtime
  2. Right-click on each process node and select Settings…
  3. Uncheck the Select automatically checkbox
  4. Connect the new Printer_Delivery_Note process node to your Printer output connector (mine is named PCL6
    • The EMAIL_Delivery_Note process node should be alreadyu connected to the MAIL output connector
  5. Right-click on the each process node and select Connector Selection…
  6. Select the Variable Connection Type and enter a variable name (see Figure 2)
code7
Figure 2
  1. Make sure that the Default Connector is the PCL6 output connector for the new Printer_Delivery_Note process node and MAIL for the EMAIL_Delivery_Note process node (see Figure 3)
code8
Figure 3: Runtime configuration for an Emailed AND printed document
  1. Open the Message
  2. Right-click on the message node and select Script…
  3. Insert the following code:

$SelectedOutputConnector = “MAIL”;
CallProc(“EMAIL_Delivery_Note”);
$SelectedOutputConnector = “PCL6”;
CallProc(“Printer_Delivery_Note”);

Export and deploy and test!

3 thoughts on “How to Simultaneously Output the Same Document via Email and via Printer

  1. Hi,
    I’m having an issue while choosing the connector selection method “variable” as per snapshot provided.
    I could only see None, Static and Lookup as connector selection methods.
    Grateful if you could please advise why I may be having this issue.

    Like

  2. No. Actually, in the older version 5.5, the functionality was available. In the version 5.6 now it was previously there too before i install it on a new server. In the new server, I’m gettjng this issue. I uninstalled it and installed it again. Same issue. Thanks for helping me out.

    Like

Leave a comment