0

Attach file

Hi all,

is there a way to print and save the pdf generated in the record sheet as an attachment?

Thanks

17 replies

null
    • Andrea
    • 6 yrs agoSun, July 29, 2018 at 8:25 AM UTC
    • Reported - view

    I solved it

    importFile(this, printAndSaveRecord(this, "My Print Layout"), "mypdf.pdf")

    • Andrea
    • 6 yrs agoSun, July 29, 2018 at 9:41 AM UTC
    • Reported - view

    Can i change  the name between " " with a test in a field? 

    E.g.

    importFile(this, printAndSaveRecord(this, "Allegato Ordine"), 'Fattura N.'.pdf")

    thanks

    • Leonid_Semik
    • 6 yrs agoSun, July 29, 2018 at 11:57 AM UTC
    • Reported - view

    Hi Andrea,

    ---

    importFile(this, printAndSaveRecord(this, "Allegato Ordine"), 'Fattura N.'+".pdf")

    ---

    Leo

    • Andrea
    • 6 yrs agoSun, July 29, 2018 at 1:05 PM UTC
    • Reported - view

    Hi Leo,

     

    it doesn’t work..

    • Leonid_Semik
    • 6 yrs agoSun, July 29, 2018 at 1:24 PM UTC
    • Reported - view

    Hi Andrea,

     It has to work . What is 'Fattura N.'? A text or a number?

    Leo

    • Andrea
    • 6 yrs agoSun, July 29, 2018 at 3:40 PM UTC
    • Reported - view

    It is text

    • Andrea
    • 6 yrs agoSun, July 29, 2018 at 3:40 PM UTC
    • Reported - view

    It is text

    • Leonid_Semik
    • 6 yrs agoSun, July 29, 2018 at 4:48 PM UTC
    • Reported - view

    Hi Andrea,

    https://www.dropbox.com/s/a13p3b9w69dgoen/Andrea-2.ninox?dl=0

    'Fattura N.' must not be empty. And if the file already contains a file with the same name, the file will not be created.

    Leo

    • Andrea
    • 6 yrs agoMon, July 30, 2018 at 8:15 AM UTC
    • Reported - view

    Hi Leo,

    now it works (the problem was the simbol "/" in text field).

     

    Another question: could i use a text field to change the name of a printed pdf, using printRecord?

    • Leonid_Semik
    • 6 yrs agoMon, July 30, 2018 at 11:43 AM UTC
    • Reported - view

    Hi Andrea,

    that is not possible yet

     

    Leo

    • Robert.2
    • 6 yrs agoTue, August 7, 2018 at 1:09 PM UTC
    • Reported - view

    I have tried this on the Mac version and it works perfectly, but on the iPad, I just get the spinning wheel and nothing is saved. Anything different we need to do in order to get this to work on the iPad version?

    • Leonid_Semik
    • 6 yrs agoWed, August 8, 2018 at 7:48 AM UTC
    • Reported - view

    this is a bug and will (hopefully) be fixed with the next update

    Leo

    • SMoore
    • 6 yrs agoWed, August 8, 2018 at 3:15 PM UTC
    • Reported - view

    This is helpful, though, what I am trying to do, is similar to one of the beta applications. When the button is clicked, it will save the PDF with a preview to a text image? What is the formula for that?

    • SMoore
    • 6 yrs agoWed, August 8, 2018 at 3:25 PM UTC
    • Reported - view

    Update: the formula will be Image:=importFile(this, printAndSaveRecord(this, "MYVIEW"), "myRecord".pdf")

     

    This works fine with a button, but not so much with a trigger after update. Any suggestions to fix this?

    • Mconneen
    • 6 yrs agoSat, October 6, 2018 at 4:19 PM UTC
    • Reported - view

    Any update on a fix?   
    My use case is posting images via the REST/API .. I will post the upload url text... and have an after update trigger that will import the file. 

    • Choices_Software_Dean
    • 5 yrs agoMon, September 16, 2019 at 7:25 PM UTC
    • Reported - view

    S. Moore said: "This works fine with a button, but not so much with a trigger ...?" regarding importFile(this, printAndSaveRecord this, "MYVIEW"), "myRecord".pdf"

    Any update on this? Looks like this was posted 13 months ago. Would really like to be able to automatically email an attachment following a new or update record trigger (ie. following a Wufoo/Zapier form submit). 

    • Birger_H
    • 5 yrs agoThu, October 10, 2019 at 9:28 AM UTC
    • Reported - view

    This will not be possible to execute in the onUpdate or onCreate trigger.

    Birger