1 Reply Latest reply on Jun 17, 2016 7:35 AM by mikebeargie

    Save PDF locally from FM Server using script.

    tech@sundamaltider.se

      So, I'm fairly inexperienced with all this and might be missing something totally obvious, but here it goes.

       

      I have a FM server hosting an invoicing solution of mine. The whole setup worked fine as long as the solution was run locally on my computer, but using Filemaker server poses a few new problems, and one in particular. I've set up a script to save an invoice as a PDF in a local folder.

       

      After some reading I've understood that this is not possible on a server solution due to security reasons which is understandable. What I'd like to do instead is sort of the same thing anyway, but save the PDF to the computer currently connected to the server, is this possible, if so, how?

       

      The current script with server compatibility set is attached.

       

      Also, if I'm being unclear or haven't provided enough information, tell me and I'll try to accommodate you as best I can.

       

      Thanks in advance!

        • 1. Re: Save PDF locally from FM Server using script.
          mikebeargie

          Are you trying to run this script with a filemaker user that is using filemaker pro connected to the server? Or are you trying to run it as a server scheduled script?

           

          I'm pretty sure your problem is just your file path in the first line.

           

          Read up on this kbb article about creating file paths in filemaker:

          Creating file paths

           

          "Invoices/" is a relative path that the filemaker server doesn't understand what to do with.

           

          You should have something like this instead:

          "file:" & get(documentspath) & "Invoices/"

           

          That would place it in an "Invoices" folder inside of a user's documents folder.