AnsweredAssumed Answered

help needed changine a pdf > email script to container pdf?

Question asked by Stuee on Aug 26, 2012
Latest reply on Aug 27, 2012 by philmodjunk

Title

help needed changine a pdf > email script to container pdf?

Post

Hi.

Firstly im using fmp12 and fms12 and go 12 on my ipad

I have the script below that's been working fine saving a pdf of either invoice or quote on my internal network location then creating a email and attaching it to the email. 

My problem was that i couldn't use outside the network as it couldn't find the save location. I also have aipad now too.

 

My choices was

save on server internally or save as a temp file on my device then delete it.

 

I made a container field and told it to store locally on the server. i tested the place pdf from my laptop and it worked and saved on the server, 

I now have the issue of changing my script to save the pdf and put in the container for that order id then use it to attach to email.

 

I would like it more to save temp on my device so it doesn't clog the fm system with pdfs

Im not sure if there is a way to save the file temp so its universal for ipad and pc? if so do tell.

 

so any help with changing my script please let me know.

thanks

 

---------SCRIPT--------------

Is there a was as the file is running from the fmserver that i can save a file direct on the server then attach to a email?

 

cheers

 

this is my script............

Emailpdf-Invoice

// Allow User Abort [ Off ]

Go to Layout

[ “Invoice” (Ordering) ]


Set Variable

[ $filePath; Value:"filewin://BP_Server/Work_drive/Important_BP/FM_Invoices/" & Ordering::Order ID & "-Invoice.PDF" ]


Save Records as PDF

[ File Name: “$filePath”; Current record ]

[

 

Document - Title: "Invoice"; Subject: Ordering::Order ID; Author: "**********"; Compatibility: Acrobat 7 and later ]

[

 

Pages - Number Pages From: 1; Include: Specific Pages; Start Page: 1; End Page: 1 ]

[

 

Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]

[

 

Initial View - Show: Page Only; Page Layout: Single Page; Magnification: Fit Page ]

[ Restore; No dialog ]

Pause/Resume Script

[ Duration (seconds): 6 ]


Send Mail

[ Send via SMTP Server;

To: Clients::Client Email;

BCC: "emaillogs@**********";

Subject: Ordering::Order ID& "

Invoice";

Message: "Hi "& Ordering::Client Name First& ",¶"&

"¶"

&"Attached is your Invoice for your recent order "& Ordering::Order ID& ",¶"&

"¶"

&"Your job is ready for collection unless you have already collected it."&"¶"

&"¶"

&"If you have any questions dont hesitate to ask."&"¶"

&"¶"

&"Thanks"&"¶"

&"**********"&"¶"

&"¶"

&"**********"&"¶"

&"**********"&"¶"

&"Geelong"&"¶"

&"Vic"&"¶"

&"3220"&"¶"

&"03 **********"&"¶"

&"0425 **********"&"¶"

&"¶"

&"*BANNERS * A FRAMES * PHOTOCOPYING * BILLBOARDS * FRAMED CANVAS * MESH * FLAGS * MARQUEES * T-SHIRTS *

STUBBY HOLDERS * KEY RINGS * PUZZLES * A4 FLYERS * A0-A1-A2 POSTERS * INVOICE BOOKS * CALENDARS * CD-DVD

DUPLICATION * CAR WRAPS * FASCIA SIGNAGE * STICKERS * PROMOTIONAL GIFTS * BUSINESS CARDS * BOOKS * PENS *

BAGS * GOLF TEES * CUPS * ENVELOPES * NOTEPADS * BINDERY * LETTERHEADS * BOOKMARKS * MENUS * MUGS * THONGS

* POLO SHIRTS * PULL-UP STAND

EXHIBITION STAND * STAMPS * CLOCK * BALLOONS * ENGRAVING * LED SIGNS * FRIDGE MAGNETS * VINYL CUT SIGNS *

DESIGN * INSTALLATION * DISTRIBUTION * PERSONALIZATION"&"¶";

Attachment: “$filepath”;

Name: "**********";

Email

Address: "info@**********";

Reply-To Address: "info@**********";

SMTP Server: "**********";

Port: 25;

Authentication Type: Plain Password;

User Name: "info@**********";

Password: "**********" ]

[ No dialog ]

Go to Layout

[ “Ordering” (Ordering) ]


Clear

[ Ordering::Invoice Emailed ]

[ Select ]

Insert Current Date

[ Ordering::Invoice Emailed ]

12 March 2012 9:38:57 BP_Main - Emailpdf-Invoice -1-

 

Outcomes