AnsweredAssumed Answered

Script an Email Message with PDF of Layout

Question asked by RayMentor on Apr 6, 2009
Latest reply on May 31, 2013 by appt

Title

Script an Email Message with PDF of Layout

Post

This is probably a simple one, but I'm stubbing my toe on it nonetheless.

 

I need to do a simple script to switch from an entry layout "A" (with buttons and colors) to a layout "B" arranged for printing (no background, colors, etc.). Once script is at "B" create an email message with the customer's email address, a standard subject line and the "body" of the email message as a PDF image of layout "B" (i.e. the invoice). Sounds simple enough.

 

An additional issue is how to design the script to support several users on a LAN using this solution. 

 

So far, I believe I have two general approaches I could use. I could be using the "Send Mail" script step or the "Save Records as PDF" with the auto-create email option (with file as attachment).

 

The second approach does create the email OK but without the email address of the customer. The first approach creates the PDF file to be attached and allows me to insert the email address of the customer into the email message, but leads me into the need to provide a FILE PATH to support ALL users on the LAN for the PDF of the invoice layout itself, the vagaries of which I've never been able to put into plain English from the FM help file explanation of file paths. I get confused by the "absolute", "local", "relative", "network" terminology and the examples given in the help file don't make any sense to me. Best way I can put what I'm trying to do into "file path language" is is to say I need a file path for the PDF image file of the invoice being created that is INDIVIDUALIZE and will allow any and all users on the LAN to create an email with JUST that PDF image file as the body of the email message going out.

 

Any thoughts on this would be appreciated. 

Outcomes