AnsweredAssumed Answered

Printing same record using different layouts

Question asked by ssnodgra on Feb 5, 2012
Latest reply on Feb 6, 2012 by RayCologon

I am using the following script to print an invoice from the Business Productivity Solution . I want to print the same record using three different layouts (Factory Order, Packing List, File Copy). I want it to print the two additional pages without any dialog.

The layouts are different. Sales Order, Packing List. File Copy



Allow User Abort [Off]

Set Error Capture [On]

If [not(fnIsWebConnection)]

If [Line Items::Sales Order ID]

Go to Related Record [Show only related records; From table: "Line Items:; Using layout: (Current Layout>;New window]

Print Setup [Restore; No dialog]

Enter Preview Mode []

Adjust Window [Resize to Fit]

If [Get(ScriptParameter) = "Print"]

Print []

Perform Script ["Print Sales Order"]


Pause/Resume Script [Indefinately]

End If

Close Window [Current Window]


Show Custom Dialog ["Alert"; "There are not line items to display."]

End If


If [Line Items:Sales Order ID]

Go to Related Record [Show oly related records; From table: "Line Items"; Using layout "Sales Order"(Line Items)]

Pause/Resume Script [Indefinately]

Go to Layout [original layout]

End If

End If




Can anyone provide add the logic to this script to make this happen?