You are here:
Salesforce Document Generation Troubleshooting Reference
Use this table to identify common issues with Salesforce Document Generation, what they mean, and how to fix them.
Required Editions
| Available in: Lightning Experience |
| Available in: Professional, Enterprise, Unlimited, and Developer Editions |
| Issue | What It Means | How to Fix It |
|---|---|---|
| We couldn't generate the document. <recordId> + Invalid XML pseudo-attribute 'version' value ' | An RTB_ token in the .docx template is wrapped inside a text box, which generates invalid XML and prevents the document from being created. | Open the .docx template in Microsoft Word, locate the RTB_ tokens, remove any surrounding text boxes, and place the token directly in the document body. Save and try again. If the issue persists, contact Salesforce support. |
| We couldn't generate the document. Could not generate document: Scope parser execution failed. Try again or ask your Salesforce admin for help. | The tokenData passed to DocGen contains a null value within a nested array or object. DocGen can’t process null values in nested token data structures. The issue isn’t caused by JSON payload size. This error can occur even if document generation previously worked. | Inspect the tokenData passed to the document generation call, identify any null values in nested arrays or objects, and remove or replace them with empty string before trying again. If the issue persists, contact Salesforce support. |
| We couldn't generate the document. <recordId> + Cannot invoke "com.groupdocs.conversion.internal.c.a.w.zzJS.zzwE()" because "" is null. Try again or ask your Salesforce admin for help. | The document template file contains comments. Salesforce Document Generation can't process template files that contain comments. | Open the document template in Microsoft Word, delete all comments, and save the file. Re-upload the document template and try generating the document. If the issue persists, contact your Salesforce account executive. |
| Bullet points in a document template render correctly when the template is created and used on a Mac. However, if the same template is downloaded and edited on Windows, bullet points display as hollow boxes when the edited template is used for document generation. | The document template DOCX file doesn't have fonts embedded, causing bullet point characters to render incorrectly across operating systems. |
|
Did this article solve your issue?
Let us know so we can improve!

