How to Create Dynamic File Names
Use merge fields in Output File Format to generate clear, searchable file names automatically.
Use dynamic file names to replace generic outputs like SD-0001.pdf.
This makes files easier to sort, search, and identify in Salesforce.
Set the output file name
Common naming patterns
Sales quotes
Quote-{!Opportunity.Name}-{!TODAY()}.pdf
Quote-Q1 Services-2024-02-04.pdf
Invoices
INV-{!Opportunity.InvoiceNumber__c}.pdf
INV-12345.pdf
Contracts
Contract-{!Opportunity.Account.Name}.pdf
Contract-Acme Corp.pdf
Reports
{!Account.Name}-Report-{!TODAY()}.pdf
Acme-Report-2024-02-04.pdf
Best practices
Avoid
/,\,:,*,?,",<,>, and|.Use hyphens or underscores instead of spaces.
Keep names under
80characters when possible.Put the most important value first.
Tips
Include record context
Start with the document type, record name, or ID.
This improves sorting in related lists and external storage systems.
Add a date when needed
Use {!TODAY()} for time-based versioning.
This helps when users generate multiple copies over time.
Keep names stable
Avoid long formulas with optional fields unless you need them.
Shorter names are easier to scan.
Last updated
Was this helpful?

