Data & connectors
Save a PDF to the Salesforce record
When someone generates a document with your Salesforce button, Weft can offer to save the PDF back onto the record it was made for: a quote onto its opportunity, a letter onto its contact. Nothing is saved on its own. The person sees the PDF first, then presses Save to Salesforce.
Before you start
- The template needs a Salesforce button — see Add a Salesforce PDF button.
- Saving uses the person's own Salesforce login, so the template must keep Each user connects their own Salesforce ticked. With shared access on, saving is switched off.
- Changing where the PDF goes, or turning saving off, needs the editor role or higher.
Choose where the PDF goes
New templates start with Files, so the button is there as soon as the template has a Salesforce button. To change it:
- Open the template's Data sources window: the data pill above your document, then Manage sources….
- Under Save to the Salesforce record, choose where the PDF goes:
- Files — a Salesforce File on the record, in its Files related list. Salesforce recommends Files.
- Attachments — a classic attachment, in the Notes & Attachments related list, for orgs that still use it.
- Off — no save; people download the PDF.
The choice applies straight away. You don't need to publish again.
Name the file
Under File name, type the name you want, with fields from the record in curly brackets — for
example Quote - {Oppty.Name} - {today}. Insert field lists today's date and every field your
data source reads. A field that is empty for a record simply drops out. Press Save name; Use
default goes back to the template name and the date. The same name is used when someone presses
Download PDF.
What people see
Next to Download PDF, the page shows Save to Salesforce. Pressing it saves the PDF as a new file and shows Saved to Files ✓ or Saved as an attachment ✓, with Open record to go back to the record in Salesforce.
For Salesforce Files, the arrow beside the button offers:
- Save as new file — another file on the record (what the button itself does).
- Save as new version — a new version of the file this template saved on this record before. Its earlier versions stay in Salesforce's version history. It is greyed out until there is an earlier file. If that file was deleted in Salesforce, the PDF is saved as a new file instead, and the page says so.
- The file is named by the template's File name setting, or after the template and the date.
- Saving twice from the same page is refused; generate the document again to save another copy.
- Salesforce records the person who pressed Save as the file's creator, and applies their own permissions.
If saving fails
| What the person sees | Usually means | What to do |
|---|---|---|
| "You don't have access to add files to this record in Salesforce" | Their Salesforce permissions don't allow it | Ask your Salesforce admin, then press Try again |
| "This record no longer exists in Salesforce, or you can't see it" | The record was deleted or is hidden from them | Check the record in Salesforce |
| Salesforce didn't confirm the save | The upload left, but no answer came back | Check the record's files first. Only if the PDF is not there, press Try again anyway |
| Connect Salesforce | Their Salesforce login was disconnected | Press Connect Salesforce, then Save to Salesforce again |
| Too large to save to Salesforce (25 MB max) | The PDF is bigger than Salesforce accepts here | Download it instead |
| "Saving to Salesforce is no longer turned on for this template." | Saving was switched off after the PDF was made | Turn it on again, or download the PDF |
| "That earlier file can't be found, or you can't change it in Salesforce" | The file was removed for good, or someone else saved it and hasn't shared it | Use Save as new file, or ask whoever saved it to share it |
Good to know
- Weft keeps no copy of the saved PDF. It checks that the file is exactly the one it generated, then hands it to Salesforce.
- Saving only ever adds — a new file, or a new version of a file Weft saved there itself. Weft never deletes anything in your Salesforce.