Search…
Resources
Related Links
printAndSaveRecord
To save a given record in a given layout as PDF in the internal file system and return a link to the file
This function prints a record in a PDF and saves the PDF in the internal file system of Ninox.
You will get a link for either internal access to the file or save it in a record with the importFile() function.
The function doesn't work if it's executed on the server. So using this function in a do as server block doesn't work. It works fine when used without a do as server block on a button. Learn more about execution context​

This function works also for Carbone templates and allows you to add optionally a JSON to overwrite the record data for the template.
Carbone templates are available on Ninox Private Cloud and On-Premises. Please get in touch with our Sales team.

printAndSaveRecord(nid, string)
printAndSaveRecord(nid, string, JSON)

link

printAndSaveRecord(record, myLayout) To save a given record in a given layout or Carbone template as PDF in the internal file system and return a link to the file.
1
printAndSaveRecord(this, "Invoices")
Result: https://dbde0000.ninox.com/AbCD1234/12345xYZzyX/loadfile/Invoices.pdf?
You will get a link to the PDF.
​
printAndSaveRecord(record, myLayout, data) To save a given record in a given Carbone template as PDF in the internal file system and return a link to the file. Record data can be overwritten with a JSON object.
1
printRecord(this, "Invoices", {
2
Date: format(if Date = null then Date else today() ,"MM/DD/YYYY")
3
})
Result: https://dbde0000.ninox.com/AbCD1234/12345xYZzyX/loadfile/Invoices.pdf?
You will get a link to the PDF. If there is no entry in the Date field, the date of today will be added, for example, 08/28/2022 on August 28, 2022.
​

​importFile, which imports a file from a URL and saves it as an attachment of a record.
​printRecord, which prints to a PDF from a given record in a given layout and opens the file with a program set as default.
Last modified 18d ago
Export as PDF
Copy link
On this page
Syntax
Return
Examples
See also