For template authors and admins: see your template filled in with a real record's data before you generate the final document, so you catch blank fields and stray {{…}} tags without the generate, open, fix and generate-again loop. The merge preview arrived in version 1.25. A check takes about 2 minutes.
Before you begin
Docs Made Easy 1.25 or later. Earlier versions don't have the merge preview. See the v1.25 release notes for the upgrade link.
A document solution with a template. If you don't have one yet, see Generate your first document with the Document Automation Wizard.
A test record with real values in the fields your template uses, for example the account Burlington Textiles Corp of America with its contacts and opportunities. A preview from an empty record shows blanks even when the template is right.
A template that isn't Excel or PowerPoint. The merge preview is available in both Basic and Pro, but not for Excel or PowerPoint templates.
How it works
Docs Made Easy merges your template with the record's data and shows the result in a live preview, before the final generation step. The preview shows the final output exactly, including the output format. Nothing changes in the template, and nothing is saved to the record unless you download and save the previewed file. You check the result, fix the template if needed, and then generate.
For how the Composer page, solution and template fit together, see How Docs Made Easy works.
Open the preview
- Open your test record and click the Docs Made Easy button for the solution. The Composer page opens.
- Select the template you want to check.
- Open the merge preview instead of generating the document. The preview shows the document with the record's data in place of the merge fields.
If the button runs in background mode (bgm), you don't see the Composer page, because the document is generated straight away.
Open the preview directly
To skip the Composer page and open the preview straight away, add the enablePreview parameter to the solution: on Assign Behaviors, click Other Parameter > Add Other Parameter, and enter enablePreview as the name.
Check the preview
Work through the document from top to bottom and look for these problems:
| What you see in the preview | What it usually means | Fix |
|---|---|---|
A label with nothing after it, such as Account name: | The field or a lookup in its path is empty, or the related object isn't on Gather Data | Merge fields are blank or show as {{…}} text |
The tag itself, such as {{Account.Name}} | A typo, the field label instead of the API name, or Word split the tag | Same article; paste the tag again from the Merge Field Helper |
Premium_Support instead of VIP Support | A picklist shows its API value | {{Label:Object.Field}} |
<p> or <br> in the text | A rich text field without the HTML parameter | {{HTML:Object.Field}} |
| A table that's empty, has one row or lists other records' rows | Tag names, filters, limits or a missing pv0 | Related-list tables are empty, show one row or repeat |
| Dates, numbers or currency in the wrong format | A missing or wrong format switch | Template syntax basics |
Fix the template and preview again
- Correct the template: retype or re-paste the tag, add the parameter, or fix the relationship or query on Gather Data.
- If you edited the Word, PowerPoint or Excel file on your computer, upload it to the solution again.
- Open the merge preview again on the same record and check that the problem is gone.
- When the preview looks right, generate the document.
Verify it worked
- Every merge field in the preview shows a value from the record, and no
{{…}}text is left. - Tables list only the current record's related rows.
- The generated document matches the preview: same values, same rows, in the output format you chose under Generated File on Assign Behaviors.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| You can't find the merge preview | Docs Made Easy is older than 1.25, the button uses background mode, or the template is Excel or PowerPoint | Upgrade from the v1.25 release notes; test a Word template with a button that opens the Composer page |
| The preview doesn't open | A pop-up blocker or blocked third-party cookies | Allow pop-ups and third-party cookies for Salesforce in your browser |
| The preview shows an error that names a field | The field doesn't exist or you can't read it | DME-SF-002, DME-SF-004 |
| The preview shows a template syntax error | A table, table group or IF tag is malformed | DME-TPL-000 |
| The preview is right but the PDF looks different | Fonts, page breaks or section settings change in the PDF | The PDF looks different from my Word template |
| Nothing generates at all | Setup, access or the button itself | Troubleshooting checklist |
Other ways to check a document
- Merge and Edit (Word): merges the template with the record and opens the result in the document editor, where you can change it before you download it. See Edit a generated Word document before you download it.
- SOQL query preview: checks the records a document query returns, before you build the template table. See Pull data into a template with a SOQL query.