Customer is requesting an automatic print of picking tickets after the SO is printed
So we did a post write on so sales order header:
There is no error message but nothing happens. Can't figure out what I am missing. Any help would be appreciated.
Sub PostWrite500()
retVAL = oSS1.nSetProgram(oSS1.nLookupTask(""SO_PickingSheetPrinting_UI""))
soPrint = oScript1.NewObject(""SO_PickingSheetPrinting_rpt"", oSS1)
'oSS1.nTerminateUI()
retVAL = soPrint.nSelectReportSetting(""STANDARD"")
retVAL = soPrint.nSetKeyValue(""ReportSetting$"", ""STANDARD"")
retVAL = soPrint.nSetKeyValue(""RowKey$"", ""1"") ' RowKey 1 or 2
retVAL = soPrint.nGetOptions(strOp)
retVAL = soPrint.nSetKey()
retVAL = soPrint.nSetValue(""SelectField$"", ""Order Number"")
retVAL = soPrint.nSetValue(""SelectFieldValue$"", ""Order Number"")
retVAL = soPrint.nSetValue(""Tag$"", ""TABLE=SO_SALESORDERHEADER; COLUMN=SALESORDERNO$"")
retVAL = soPrint.nSetValue(""Operand$"", ""="")
retVAL = soPrint.nSetValue(""Value1$"", OrderNo)
retVAL = soPrint.nWrite()
retVAL = soPrint.nProcessReport(""PREVIEW"")
End Sub