AnsweredAssumed Answered

How can I prevent Filemaker from crashing when running a script (Send Invoice By Email) ?

Question asked by ostenzen on Jan 23, 2013
Latest reply on Jan 23, 2013 by philmodjunk

Title

How can I prevent Filemaker from crashing when running a script (Send Invoice By Email) ?

Post

I'm sending an invoice by email. I save the record as PDF and then I send the invoice via an email client. The script runs fine the first time I click the button but the second time around filemaker crashes. I tried to send the email via Outlook and  Moxilla ThunderBird but the second time around FileMaker always crashes. This is the script.

Send Invoice by Email

Set Error Capture   [ On ]

Freeze Window

If [ Get ( LastError ) = 0  ]

 Set Variable  [ $PATH; Value:Get ( TemporaryPath ) & "Invoice " & Invoice::InvoiceID & ".pdf"  ]

 Go to Related Record   [ Show only related records; From table:  “ItemLine” ; Using layout: “Print/Send Invoice” (ItemLine) ; New window ]

 Save Records as PDF  [ Restore; No dialog; “$PATH”; Records being browsed ]

 Send Mail [ Send via E-mail Client ; To: Client::EMail; Subject: "Invoice # " & Invoice::InvoiceID & " | " & CompanyInfo:: CompanyName; Attachment:    “$PATH” ]

 Close Window  [ Current Window ]

End If


Help to troubleshoot this issue is appreciated.

-- Christian

Newbie to FileMaker
          Moxilla Thunderbird
          Outlook 2007
          FileMaker 12 Pro Advanced
          Window 7 64 bit

      

filemakerCRASH1.png

Outcomes