AnsweredAssumed Answered

Close New window

Question asked by thong127 on Jul 18, 2013
Latest reply on Jul 22, 2013 by thong127

Title

Close New window

Post

     Hello,

     Kindly help me with my script, I want the new window to be closed when I click CANCEL on my Custom Dialog Box. below is my script.

     IBS::Materials Report Selected = "API"

     Perform Script ["API"]

     Go to Related Record [Show only related records; From table:"Materials';Using layout:"API" (Materials);New Window

     Enter Preview Mode []

     Show Custom Dialog ["Print Options";"Would you like to Print or create a PDF"]

     If[Get ( LasMessageChoice ) = 1

     Show Custom Dialog ["Print Instructions"; "Pleasemake sure printing is set to Current Record and choose the printer you would lilke to print"]

     Print[Restore:\\Printer name]

     Else If [Get( LastMessageChoice ) = 2

     Show Custom Dialog [name your File"; Please Name Your File."IBS::Filename]

     If[Get ( LasMessageChoice ) = 1

     Sert Variable [$FileName Let(Name =Intelli Session::FileName & ".pdf";Case(Get(LastMessageChoice) = 1;

     "file:" & Get(DocumentsPath) & Name;Get(LastMessageChoice) = 2;"file:" & Get(DesktopPath) & Name;
     "file:" & Get(TemporaryPath) & Name))
      
     Print Setup [Restore;No dialog]
      
     Save Records as PDF [Restore;No dialog; $Filename'; records being browsed]
      
     Close Window [Current Window]
      
     Else If [Get ( LastmessageChoice ) = 3]
      
     Close Window [Current Window]
      
     End If
      
     End If
      
     End If
      
     Thank you in advance.
     thong

Outcomes