8 Replies Latest reply on Apr 28, 2011 11:08 AM by R12GS

    PDF Of Record To Email

    user14040

      Title

      PDF Of Record To Email

      Post

      This is a great feature but the question is how do I import the email address in the To field when emailing the PDF?

      Please let this have been added to the update and not just adding PDF to email, which I love but it would take less time if everything is transferred over, email address and PDF of record.

      I tried a few scripts but it either didnt include the email address but included the PDF or

      Included the email address and did not include the PDF. 

      Help Please

      thanks

        • 1. Re: PDF Of Record To Email
          TSGal

          Lawfour:

          Thank you for your post.

          Save / Send -> PDF will not import an email address.  You would have to do that via a script.  Since the file location is different on a Mac and iPad/iPhone, the script would be:

          Set Variable [ $FileName ; Value: "Test_" & Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) & ".pdf" ]
          Save Records as PDF [ No dialog ; "$FileName" ; Records being browsed ]
          Set Variable [ $PDFPath ; Value: Get (DocumentsPath) & $FileName ]
          Send Mail [ Send via E-mail Client ; To: "user1@abc.com" ; Subject: "Invoice" ; Message: "Test" ; "$PDFPath" ]

          (Thanks to our Software Quality Assurance (Testing) department for supplying the script.)

          If you perform this twice on the same day, the existing PDF will not be overwritten so the filename will append the number 1.  A third time, the number 2 will be appended, and so on.  Therefore, be sure to specify a unique filename, or you will be sending the same file over and over again.

          Let me know if you have any questions.

          TSGal
          FileMaker, Inc.

          • 2. Re: PDF Of Record To Email
            R12GS

            This is not an "answer", but a continuing question

            ==================

            I am trying to use these script steps, but when I do this step

            Save Records as PDF [ No dialog ; "$FileName" ; Records being browsed ]

            It comes in like this:

            Save Records as PDF [ Restore; No dialog ; "$FileName" ; Records being browsed ]

            I don't want to "restore" I want to use the variable to set the filename.  How do I turn off the "Restore" option?

            Thanks!

            • 3. Re: PDF Of Record To Email
              TSGal

              R12GS:

              Thank you for your post.

              If you are just using "Records being browsed", then there is no need to check "Specify options".  If you uncheck it, then "Restore" will disappear and you'll be left without the Restore option.

              Let me know if you need additional clarification.

              TSGal
              FileMaker, Inc.

              • 4. Re: PDF Of Record To Email
                R12GS

                Actually, I want this:

                Save Records as PDF [ No dialog ; "$FileName" ; Current Record ]

                but I get this:

                Save Records as PDF [ Restore; No dialog ; "$FileName" ; Current Record ]

                How can I get rid of the Restore?

                • 5. Re: PDF Of Record To Email
                  philmodjunk

                  It works as written doesn't it?

                  Don't worry too much about the "restore" that's a scripting bit of extra text that is supposed to tell the person reviewing the script that there are additional options selected that aren't visible unless you click a specify button to open up a dialog where you can view the details that are specified for the script step. You'll see this also with Perform Find, Sort, Print and other steps.

                  I agree that it isn't really needed here, but it does no harm either.

                  • 6. Re: PDF Of Record To Email
                    R12GS

                    Actually it doesn't work, which I blamed on the 'restore' ('restore' is somewhat of a mystery to me anyway).  Emailing a receipt to a customer is essential function, I'm certain that lots of people have done this script.  Would be GREAT if someone can see what the problem is and suggest a solution.

                    1. It does create a PDF, but it puts the pdf in the 'Filemaker Pro' application folder, I would like it to appear on the desktop (mac and win)
                    2. it creates the email but fails to attach the pdf

                    Here is my current "email a receipt" script:

                    Set Variable [ $pdf_filename; Value:"Your Invoice_" & Product_Sales::Invoice_ID & ".pdf" ]

                    Save Records as PDF [ File Name: “$pdf_filename”; Current record ] [ Document - Title: "Invoice " & Product_Sales::Invoice_ID; 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 ]

                    Set Variable [ $pdf_path; Value:Get ( DocumentsPath ) & $pdf_filename ]

                    Send Mail [ Send via E-mail Client; To: Product_Sales::inv_ship_email; Subject: "Invoice # " & Product_Sales::Invoice_ID; Message: "If you have any questions please contact sales@________.com"; Attachment: “$pdf_path” ]

                    • 7. Re: PDF Of Record To Email
                      philmodjunk

                      This is with FileMaker PRO on a mac or windows system and not FileMaker GO on an iPad or iPhone? (You posted your question in the FM GO section. Wink )

                      If so, you need the full filepath to the desktop not just the file name.

                      See this thread: Found Sets to PDF with unique file names

                      • 8. Re: PDF Of Record To Email
                        R12GS

                        Yes I'm using FileMaker PRO - ooooops, sorry folks!

                        There is no indication on this page, which forum it came from.  Anyway I'll get on the proper forum and make a proper post.