AnsweredAssumed Answered

Email PDF from iPad and save copy of PDF

Question asked by ericjlindholm on Sep 30, 2013
Latest reply on Oct 4, 2013 by philmodjunk

Title

Email PDF from iPad and save copy of PDF

Post

     I have a very functional script that works on a desktop perfectly.  It stores a copy of the PDF in a doc archive table and then attaches it to an email.  When I try to execute it from an iPad, it does not work because of the different temp file arrangement.  Can u recommend a mod that would make it work or should I figure out how to run it as a server side script if that is possible.  Thank you!

      

      

Allow User Abort [ On ]

If [ not IsEmpty (Line Items::Event ID) ]
Go to Related Record [ From table: “Line Items”; Using layout: “Delivery Receipt” (Line Items) ]

[ Show only related records; New window ]

Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore; No dialog ]

Adjust Window

[ Resize to Fit ]

Show/Hide Toolbars

[ Show ]
Pause/Resume Script [ Indefinitely ]
Set Variable [ $EventID; Value:Equipment List::Event ID ]
Set Variable [ $$FileName; Value:"Delivery Receipt-SWP-" & EVENT::Event Name & ".pdf" ] Set Variable [ $$FilePath; Value:Get ( TemporaryPath ) & "/"& $$FileName ]

Save Records as PDF [ File Name: “$$FilePath”; Records being browsed ]
                    [
Document - Compatibility: Acrobat 5 and later ]
                    [
Pages - Number Pages From: 1; Include: All pages ]
                    [
Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]

[ Restore; No dialog ]

Send Mail [ Send via E-mail Client; To: Event_ Contrac to Contacts::Email; Subject: "Delivery Receipt from SWP for " & EVENT:: Event Name; Message: "Hello," & ¶ & ¶ & "Attached is a delivery receipt for your event." & ¶; Attachment: “$$FilePath” ]

Go to Related Record [ From table: “Equipment List”; Using layout: “Equipment List” (Equipment List) ] [ Show only related records ]

Close Window [ Current Window ]
Insert Calculated Result [ Equipment List::Delivery Receipt Last Sent; Get ( CurrentTimeStamp ) ]

[ Select ]

Go to Layout [ “Documents” (Documents) ]
New Record/Request
                    Set Field
[ Documents::Event ID; $EventID ]
Insert File [ Documents::Document; “$$FilePath” ]
Go to Related Record [ From table: “Equipment List”; Using layout: “Equipment List” (Equipment List) ]

End If
                    If
[ IsEmpty (Line Items::Event ID) ]

Show Custom Dialog [ Message: "There are no billable line items assigned"; Default Button: “OK”, Commit: “Yes” ] End If

Go to Related Record [ From table: “Line Items”; Using layout: “Prep Pull Detail iPad” (Line Items) ] [ Show only related records ] 

      

Outcomes