I want to thank everyone in this forum in advance for the wealth of information you have posted and gathered here.
With that information, I have been able to apply a script to automatically print Sales Orders once they are entered.
The script below runs as a Table - Post Write on the Sales Order Header table.
SONo = ""
oSOPrint = ""
oPaperless = ""
retVal = oBusObj.GetValue("SalesOrderNo$", SONo)
Set oSOPrint = oSession.AsObject(oSession.GetObject("SO_SalesOrderPrinting_rpt"))
retVal = oSOPrint.SelectReportSetting("STANDARD")
oSOPrint.QuickPrint = SONo
'Set Paperless options
Set oPaperless = oSession.AsObject(oSOPrint.coPLCommon) ' Get Paperless object
oPaperless.FormPrintUISelection="7" ' Number of selection in dropbox on the Sales Order Printing Screen
retVal = oSOPrint.ProcessReport("PRINT")
The above script works great to print to PDF. However, I wanted to also Electronically Deliver the PDF. I changed the oPaperless.FormPrintUISelection setting to 6, but when I do this, it only prints the PDF and it does not Electronically Deliver anything. Same thing if I change the setting to 2 (Electronically Deliver only). When I Accept the Order, I see a quick "Sales Order Printing" screen flash, then nothing happens.
Am I missing some PDF setting that will trigger this? Does anyone have any ideas or input?
Thanks in advance again.