Back to the blog

Salesforce file storage for generated contracts: Files vs Notes & Attachments

Storage & Limits 6 min read 11 September 2026

The problem, in two sentences

Your org produces a lot of PDFs from Opportunity, Contract and Quote records, and you don't have a consistent rule for where to save them. That confusion leads to full org storage, failed attachments when files are large, and a mess of duplicate drafts and signed copies.

When to choose Salesforce Files vs Notes & Attachments for document generation storage

Start with one non-negotiable: Notes & Attachments is capped at 25 MB per file by Salesforce and that cap cannot be raised. Savvy DocuGen can produce documents up to 40 MB, so any document over 25 MB must be saved to Salesforce Files.

Pick Files when any of these are true:

  • Your template bundle can produce a combined PDF over 25 MB (large images, many pages, or bundled templates).
  • You want modern file sharing and preview in Lightning, or you need file versioning and libraries.
  • You need to attach signed PDFs back to records and keep them available for Lightning record feeds.

Notes & Attachments is only useful when files are small and you must keep legacy attachments for older automation that still expects the old object. For any new template, choose Files by default.

How Savvy DocuGen handles document sizes and document generation storage

Savvy DocuGen fills Word and PDF templates from any Salesforce record (Opportunity, Account, custom __c objects). It writes the finished document back to the originating record either as Salesforce Files or as Notes & Attachments, per template configuration. Signed PDFs return from Circularo and are written back to the same record as well.

Important product facts to plan around:

  • Documents generated by DocuGen can be up to 40 MB.
  • Notes & Attachments is capped at 25 MB per file — so larger docs must use Files.
  • Signature positions use anchor tags, so they survive repagination and won’t force you to rework templates when page counts change.
  • DocuGen works in sandboxes exactly the same as in production, so you can test storage behaviour safely.

Practical admin rules to keep storage under control

Pick a single per-template storage target and be explicit about what you save. Some templates should save only final signed PDFs; others (internal drafts) should be temporary.

  • Template setting: save the signed final PDF to Files and avoid saving intermediate drafts unless necessary.
  • Naming convention: include record id and date in the file name so automated cleanup can find old files quickly. Example filename pattern:
Opportunity-{!Opportunity.Name}-{!Opportunity.Id}-{!TODAY}.pdf
  • Cleanup policy: schedule a report or Flow that deletes old draft files (e.g. delete Files tagged Draft and older than 90 days). Don’t keep both a draft and a signed copy unless your process requires it.
  • Limit bundling: bundling multiple templates into one signature run is convenient, but bundles can push the result over 25 MB — configure those templates to save to Files automatically.
  • Strip unnecessary assets from templates: remove high-resolution images, embed fonts only if required, and avoid large background images that bloat PDF size.

Example (hypothetical)

Suppose you generate a 60-page renewal agreement with logos and embedded product tables, and you run that for 200 renewals a month. If you store both a pre-sign draft and a signed copy for each renewal, you quickly multiply file count and storage use. Save only the signed copy to Files and keep the draft only until the signature completes — then delete the draft automatically.

Access, sharing and retention considerations

Files give you better sharing and visibility in Lightning. When you save generated documents as Salesforce Files, you can:

  • Use file sharing settings to restrict visibility to related users or teams.
  • Link files to multiple records (Account and Opportunity) without duplicating storage.
  • Use ContentDocument and ContentVersion for programmatic queries and cleanup with Flows or Apex.

Notes & Attachments do not offer these benefits and are rarely the right choice for new document generation flows.

Operational checks before you roll out templates

  • Test one template in a sandbox with sample data that mirrors your real documents (images, tables, repeats). Confirm the generated file size and whether it needs Files.
  • Decide per-template: save to Files if the template may exceed 25 MB or if you need Lightning file features.
  • Document the retention policy: who keeps signed copies, for how long, and when old files get archived or deleted.
  • Ensure users know which button to click: if you have separate buttons for "Save Draft" and "Send for Signature", make the storage behaviour clear in the button label or tooltip.

One last operational tip for admins

Because Savvy DocuGen connects through an authorised connection and is not a managed package, there’s nothing additional for your security team to install. Test everything in a sandbox so you see exactly how many files are created and how large they are before you flip the switch in production.

Savvy DocuGen writes signed PDFs back to the same record and supports anchor-tag signatures, bundling, and parent/child lookups — so you can design templates that minimise churn and then store only the final artefacts where they make sense.

Ready to try this in your sandbox? Install nothing and connect Savvy DocuGen to your sandbox account to test template sizes, storage destination, and retention policies with real records.

Read next