Template, letterhead or generated document cannot be deleted: retire or void it instead
A document template that produced documents, that an email template attaches or that a workflow rule uses is kept for history and is retired rather than deleted; a letterhead is deleted only once no template uses it; a generated document that was sent is voided, never deleted.
Messages this explains
- “Documents were generated from this template; retire it instead”
- “Message templates attach this template; remove the attachment first”
- “Workflow rules generate or attach this template; change those rules first”
- “Document templates use this letterhead; change them first”
- “This document is already void”
- “A sent document cannot be deleted; void it instead”
- “No letterheads yet: documents render without branding until one exists”
Template, letterhead or generated document cannot be deleted: retire or void it instead
You pressed Delete on a document template, a letterhead or a generated document, and the app refused because something still depends on it, or because the record must stay on file.
What you see
On Document templates, the Delete document template dialog ("Delete <name> (<code>) and all its versions? Templates that already produced documents cannot be deleted; retire them instead.") fails with one of:
- "Documents were generated from this template; retire it instead": at least one generated document (a letter, agreement, cost sheet…) was made from it, whatever its status now.
- "Message templates attach this template; remove the attachment first": an email message template lists it under Attachments.
- "Workflow rules generate or attach this template; change those rules first": a workflow rule has a Generate document action that uses it, or a Send email action that attaches it.
On Letterheads, the Delete letterhead dialog ("Delete <name>? Templates that use it must be changed first.") fails with "Document templates use this letterhead; change them first". The grid's empty state, "No letterheads yet: documents render without branding until one exists", is not an error: it tells you that documents will be produced without a logo, header or footer until a letterhead exists.
On Generated documents and on a record's documents card (for example Booking documents):
- Void <number>? fails with "This document is already void" when someone voided it after your page loaded.
- Delete <number>? fails with "A sent document cannot be deleted; void it instead" when the document was emailed. The Delete icon is only shown on Generated documents, so you meet this message when the document was sent after your page loaded.
Why it happens
A generated document is evidence of what was sent to a buyer, a member or a partner, and it keeps the version of the template it was made with. Deleting the template would leave those documents without their source, so a template that has produced anything is retired instead: it stays on file, can no longer be used, and its documents keep rendering. The same logic keeps an email template or a workflow rule from silently losing the template they attach or generate.
A letterhead is only branding, so it can go once no template's draft points at it. The guard counts the templates whose current draft uses the letterhead; published versions and documents that used it keep rendering without it once it is gone.
A generated document that was emailed has left the building. Voiding keeps the row and its number, marks it Void (with a watermark on screen and in a freshly rendered PDF) and records a reason, so a printed copy in someone's hands can always be traced. Only a document that was never sent (Generated) can be deleted outright.
How to fix it
- Retire the template instead. Open it from the list and press Retire on the Document template page, then Retire in "Retire this template?". This needs the Publish permission on Document Templates; in the default roles that is the Administrator, the Sales Manager and Legal & Documentation. Retire is offered on Published templates. A retired template disappears from the generate pickers, and workflow rules that still use it fail when they run (the dialog warns "workflows that use it will fail"), so change those rules as in step 3. Reopen brings it back if you change your mind.
- Remove the attachment from each email template that lists it: open the Message template, press the cross next to the attachment under Attachments, then Save changes (the Edit permission on Message Templates).
- Change the rules that use it: open each Rule, pick another Document template in the Generate document action or drop it from the Send email action's attachments, then Save changes (the Edit permission on Workflow Rules).
- Then delete, if the template never produced a document: Delete on Document templates (the Delete permission on Document Templates; in the default roles the Administrator and Legal & Documentation).
- For a letterhead, open every template that uses it, change Letterhead and press Save draft (the Edit permission on Document Templates); then Delete the letterhead (the Delete permission on Document Templates). If you only want it out of the way, untick Active on the letterhead panel and Save changes instead: inactive letterheads are not offered on templates.
- For a sent document, press Void on the row, give a reason if you have one, and confirm with Void (the Edit permission on Generated Documents). Generate a fresh document if a corrected one is needed; the void one keeps its number.
- If the message says the document is already void, reload the page; nothing else is needed.
Related
Related
- Document templatesScreen
The list of your organization's document templates (demand letters, offer letters, termsheets, agreements, allotment letters, receipts, cost sheets), with filters and the actions to create, duplicate, open or delete one.
- Document templateScreen
The template designer: write a template's wording with merge fields, set its letterhead, title and page layout, preview it against a real record, and publish, retire or restore its versions.
- LetterheadsScreen
Set up the branding wrapped around generated documents: logo, header and footer, page size, orientation, margins and page numbers, for the whole organization or for one project.
- Generated documentsScreen
The organization-wide log of every document generated from a template or uploaded against a record, where you preview, download, email, void or delete them.
- Booking documentsScreen
The letters and agreements generated for one booking, such as the allotment letter, together with the receipts of its payments and the letters of its demands, with the button to generate another from a published template and the icons to preview, download, email, void or delete each one.
- Message templateScreen
One message template's page: change its wording, attachments and settings, and preview it filled in for a real record.
- RuleScreen
One automation rule's page: read or change its basics, trigger, conditions and actions, test it against a record, clone or delete it, and switch a system rule on or off.
- Files cannot be uploaded: storage is not configured, the file is too big or empty, or it went missingTroubleshooting
Logos, stage files, signed copies and uploaded documents live in an object store set up for the installation; until it is configured uploads are refused while dates and records still save, a file must have content and stay within the size limit (25 MB for documents, 2 MB for logos), and an uploaded document can only be downloaded, not previewed.