action.skip

How to control PDF file names?

← PDF and Email FAQ

JustOn generates PDF documents when finalizing invoices, dunning reminders and account statements. The default naming pattern for the produced PDF files is [InvoiceDate]_[InvoiceNo]_[AccountName].pdf, as defined in the field PDF Name of JustOn's default template.

Allowed characters

Produced PDF files will be viewed and downloaded by users who use different operating systems (Windows, MacOS, Linux) and devices (desktops, tablets, smartphones). This is why it is essential to avoid common illegal filename characters.

Usually, the allowed characters for filenames include the alphanumeric characters a-z A-Z 0-9 as well as the underscore _ and hyphen - characters.

Whenever possible, try to avoid any of the following illegal characters or symbols in your filenames, because they may produce errors: # % & { } \ / | < > * ? $ ! ' " ` : ; @ + =

For more details, see, for example Comparison of filename limitations.

Placeholders for PDF names

The PDF name definition uses placeholders to include dynamic data. Usual placeholders to have the file names built according to your requirements include, for example, [AccountName], [InvoiceDate], [InvoiceNo] or [DisplayType].

So the first option is to set the name pattern in the field PDF Name of the template or – for credits, cancellations, dunning reminders, and account statements – the template detail.

There are, however, other options that allow you to control the PDF file name creation, namely when

  • creating PDF files for invoices and dunning reminders on finalization
  • creating PDF files to be downloaded in ZIP files

If you want to modify the naming pattern that is used on file generation, you can create a dedicated File Distribution custom setting, for example:

Field Value
Backend Invoice
Name InvoicePDFname
PDF Name [AccountName]_Invoice_[InvoiceNo].pdf
Active true

This produces invoice PDF files with a name like JustOn_Invoice_201700018.pdf, located in the default location (on Salesforce's Files tab in the group Owned by me), and links the file with the corresponding invoice record.

If you want to modify the naming pattern that is used for PDF files subject to the ZIP download, you create a dedicated PDF Name custom setting, for example:

Field Value
Name DownloadPDFName
Name Pattern Invoice-[InvoiceNo].pdf

This produces invoice PDF files with a name like Invoice-201700018.pdf, packed in the ZIP file provided for downlaod.