Comment on page
importFile
To import a file from a URL and save it as an attachment of a record
With this function, you can import a file and attach it to a record or insert it in an image field.
The file can be pulled/retrieved from an external URL. But with
printAndSaveRecord()
you can also attach an extra created file.importFile(nid, string)
importFile(nid, link)
importFile(nid, string, string)
importFile(nid, link, string)
file
importFile(record, link, fileName
) To import a file from a given URL string and save it as an attachment of a record.1
importFile(this, "https://ninox.com/example.jpg", "Image.jpg")
Result: The file provided via the given link is attached to the current record with the name Image.jpg.
1
Invoice := importFile(this, printAndSaveRecord(this, "Invoice layout"))
Result: Prints the current record in the Invoice layout to a PDF and saves the file in the Invoice image field.
printAndSaveRecord
, which saves a given record in a given layout as a PDF in the internal file system and returns a link to the file.Do you want to dive deeper into the topic? Take a look at the corresponding part of our video tutorial.
Last modified 7mo ago