---
schema_version: "1"
id: b8d27edc95c48192f91e64a3b247f2c22f5f081a51fe17ea02abf2fb604edf73
title: Omnistudio Document Generation Troubleshooting Reference
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/docgen_troubleshooting_reference.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.docgen_troubleshooting_reference.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b9c98b14a4cf91d3f8ca1fe3a38674b56d2065d1316ab6ba93cf5b1fe8e4206f
description: Use this table to identify common issues with Omnistudio Document Generation, what they mean, and how to fix them.
products:
  - Omnistudio Document Generation
release: "264"
---
# Omnistudio Document Generation Troubleshooting Reference

Use this table to identify common issues with Omnistudio Document Generation, what they mean, and how to fix them.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong class="uicontrol">Professional</strong>, <strong class="uicontrol">Enterprise</strong>, <strong class="uicontrol">Unlimited</strong>, and <strong class="uicontrol">Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20349e74">Issue</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20349e77">What It Means</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20349e80">How to Fix It</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 "> We couldn't generate the document. &lt;recordId&gt; + Invalid XML pseudo-attribute
              'version' value '</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">An RTB_ token in the .docx template is wrapped inside a text box, which generates invalid XML and prevents the document from being created.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">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.</td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 "> We couldn't generate the document. Could not generate document: Scope parser
              execution failed. Try again or ask your Salesforce admin for help.</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">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.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">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.</td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 "> Access to XMLHttpRequest at
              'https://&lt;orgname&gt;--omnistudio.sandbox.vf.force.com/resource/&lt;resourceId&gt;/omnistudio__vlocity_core_assets/latest/vlocity_core_assets.js'
              from origin 'https://&lt;orgname&gt;.sandbox.lightning.force.com/' has been blocked by CORS
              policy: No 'Access-Control-Allow-Origin' header is present on the requested
              resource.</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">The Omnistudio sandbox Visualforce page origin isn’t listed in the org's CORS
              allowlist, blocking the browser from completing the request.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">In Salesforce Setup, open CORS, click New, and add the blocked origin URL. For
              example, https://&lt;orgname&gt;--omnistudio.sandbox.vf.force.com). Save and perform a hard
              browser refresh 3–4 times. If the issue persists, contact Salesforce support.</td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 ">The document generates successfully, but merge fields tied to extracted data appear
              blank in the generated document. Only formula fields that don't depend on data, such as NOW
              or a static formula, display correctly.</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">This can occur for several reasons, such as the user generating the document may lack
              the required object or field-level access, a referenced Apex class may be missing or
              inaccessible, or a field used in the data mapping may have been deleted from the
              org.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">Verify the user has read access to the required objects and fields, confirm the mapped
              fields still exist in the org, and confirm any referenced Apex classes are available and
              accessible. Re-test document generation. If the issue persists, contact Salesforce
              support.</td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 ">Could not generate document: Multi error</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">The document template .docx file has comments enabled, or a table in the template has
              improper font effects.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">Open the document template in Microsoft Word and remove all comments. To check a
              table, select it and press Cmd+D (Mac) or Ctrl+D (Windows). Under Effects, if any option
              shows a minus sign (-), the table has improper font effects. Delete the table and recreate
              it.</td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 ">Document generation process (DGP) request failed and document isn't generated.</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">When a DocumentGenerationProcess record fails, it doesn't resume automatically. The
              record stays in your org as a record of the request.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">
              <p>There are two ways to fix this:</p>
              <ul>
                <li>Create a new record: Create a record from the same source that created the original
                  request, such as a trigger, Integration Procedure, Omniscript, Screen flow, or Apex.</li>

                <li>Clone the failed record: Use this if the input is correct and the root cause is
                  resolved. Cloning preserves the input values and retries the request. For Apex cloning
                  code, see <a href="https://help.salesforce.com/s/articleView?id=ind.sf_docgen_resolve_failed_docgen_request.htm&amp;type=5&amp;language=en_US" target="_blank">Resolve a Failed Document Generation Request</a>.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Issue" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e74 ">The error "Failed while making http call to: UpdateDocumentGenerationResult with
              response status code: 403. Reason: ContentVersion creation failed. : Invalid sharing type V"
              appears when a user tries to generate a document using server-side document
              generation.</td>

            <td data-label="What It Means" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e77 ">The user has the <strong class="uicontrol">Query Non Vetoed Files</strong> app permission enabled. This permission blocks document generation.</td>

            <td data-label="How to Fix It" class="slds-cell-wrap" style="vertical-align:top;" headers="d20349e80 ">Remove the <strong class="uicontrol">Query Non Vetoed Files</strong> permission from each
              permission set, permission set group, or profile that grants it to the user. To find these,
              from Setup open the user's record page, and click <strong class="uicontrol">View Summary</strong>.
              Search for <strong class="uicontrol">Query Non Vetoed Files</strong> and use <strong class="uicontrol">Access Granted
                By</strong> drop down to find each permission set, permission set group, or profile that
              grants it. Disable the <strong class="uicontrol">Query Non Vetoed Files</strong> permission and then
              retry generating the document. See knowledge article <a href="https://help.salesforce.com/s/articleView?id=004517924&amp;type=1&amp;language=en_US" target="_blank">Understanding the "Query Non Vetoed Files" Permission and Salesforce File
                Access Issues</a>.</td>

          </tr>
        </tbody>
      </table>