Generate a document from a record

Use the Documents tab on a record to make a PDF from a template and download it later.

Make a PDF from a record with one click and download it later from the same record.

Before you start: a template must be bound to the record's type (see Create a template). You need Can generate on Document templates, permission to read the record, and permission to add files to the template's Drive space.

Steps

  1. Open the record (for example an invoice) from its list.
  2. Click the Documents tab at the top of the record window. The Documents tab of a record
  3. Under Generate, click the button named after the template.
  4. Wait for "Document generated". The new file appears under Generated documents.
  5. Click Download next to a file to save the PDF.

Generate for many records

Make one document per record for a whole selection — every quote for this week's leads, every payslip letter.

  1. Either:
    • open the record type's list, tick the records, and click Generate PDFs in the bar above the list; or
    • in Templates, right-click a template (or click its ⋯) and choose Generate for several records, then pick the records.
  2. Pick the Template if there is more than one.
  3. Under Output, choose A zip with one PDF per record or One PDF with every document, ready to print.
  4. Click Generate.

{img('bulk-pdf','The Generate dialog for three selected leads with a Quotation template and the zip or single-PDF choice')}

The file is saved in the template's Drive folder, and a Download button appears. In a single PDF, each document starts on a new page with its own page numbers.

  • Up to 500 records at a time.
  • Records you cannot open are left out; a note says how many and why. Fields hidden from you print blank.
  • Each record's Documents tab lists the zip or combined PDF it was part of.

What happens next

  • The PDF is saved in the Drive space chosen on the template, in a folder named generated/<template-name>/.
  • The file name is built from the template name, a label from the record, and the time. The label is the first of number, name, title, label or email that has text, otherwise a short code from the record id. A short unique code is added at the end so two documents made in the same second never overwrite each other.
  • Each generation is listed under Generated documents with the template name, date and time, and size.
  • Regenerating makes a new file. Earlier ones stay in the list and in Drive.

To make a document open only with a password, or to stamp a word such as DRAFT on every page, see Passwords, watermarks and combined PDFs.

Tips

  • Only templates bound to this record's type show as buttons.
  • The generated file is an ordinary Drive file. Whoever can open that Drive space can open it. See Drive.
  • Functions can also generate documents. See the developers section.

Troubleshooting

No document templates No template is bound to this record type yet. Bind one in Templates.

Generation failed The message explains why. Typical causes: the layout has a problem that only shows with this record, or you do not have permission to add files to the Drive space.

Download failed The file may have been removed from Drive. Generate again.

You do not have permission to do that You need Can generate on Document templates, and edit access to the template's Drive space.