Use this page when a flow or a Document Bulk Merge batch runs but a record gets no document. These runs happen in the background, so errors don't appear on screen. For a button, use the document didn't generate checklist.
What you'll see
- You save a record that meets the flow's conditions, but no file appears on the record, even after you refresh the page.
- You receive a Salesforce email saying that an error occurred with your flow.
- A bulk batch shows Bulk Document Generation is Complete!, but some records have no file.
Most likely causes
- The flow didn't run. It isn't active, or the record didn't meet the entry conditions.
- The action has the wrong IDs. The Solution ID comes from another org, or the record ID is a typed value instead of
{!$Record.Id}. - The user is missing a license or permission set. Flow and bulk generation need both the Docs Made Easy and Docs Made Easy Pro licenses and permission sets.
- The generation failed in the background, for example because of record access (DME-SF-004), your plan's document limit (DME-LIC-001) or the Salesforce API limit (DME-SF-005).
How to fix it
Check that the flow ran
- In Setup, open Flows and check that the latest version of your flow is Active.
- Check the entry conditions against the record. With Stage Is Changed True, the flow runs only when the stage changes. Saving an opportunity that is already Closed Won doesn't trigger it.
- In Flow Builder, click Debug and choose the record to see whether the conditions are met.
- If the flow ran and failed, Salesforce sends a flow error email and lists the interview in Setup → Paused and Failed Flow Interviews.
Check the IDs in the action
- Open the ASync Document Generate Solution action in your flow.
- For
recordId, select{!$Record.Id}from the resource picker. A typed ID always generates the document for that one record. - For
documentSolutionId, open the solution in this org and copy its Solution ID again. See Automate document generation with Flow. - For bulk, open the Document Bulk Merge record and check that its Solution ID and Query ID also come from this org.
Salesforce record IDs are different in every org. A solution or query created in a sandbox gets a new ID in production, including after you move it with Push to Production/Sandbox. To avoid editing every flow after each move, store the Solution ID in a custom label or custom metadata record, set per org, and reference it in the flow.
Check where the file was saved
Documents generated from Flow or Document Bulk Merge appear in both Files and Notes & Attachments on the record. The solution's background mode (bgm) setting doesn't change that. On the record's Related tab, refresh the page and check either list. See Where generated documents are saved.
Find the error from a background run
Flow failures are recorded in the Salesforce debug logs.
- In Setup, open Debug Logs and add a trace flag for the user who saves the record (for bulk, the user who runs the batch).
- Reproduce the problem, then open every log from the next few minutes. Background work can appear in a later, separate entry.
- Search the logs for
EXCEPTIONorFATAL_ERROR, and for messages that containDME-. If you find aDME-code, open its page from the error list. - In Setup, open Apex Jobs to see the status of background jobs in your org and the first error of any that failed.
Check the user the automation runs as
A record-triggered flow runs as the user who saved the record. Scheduled paths run as the Automated Process user. The user who runs Flow or bulk generation needs:
- both the Docs Made Easy (Basic) and Docs Made Easy Pro licenses
- either the Docs Made Easy Business User or the Docs Made Easy Admin permission set
- the Docs Made Easy Pro User permission set
Each user also authorizes the app once, with their own login, by clicking Authorize App the first time they generate a document. An admin can't do it for them. See Assign licenses and permission sets.
Bulk: the batch failed or some records have no file
Bulk generation runs from the solution ID. A syntax or configuration problem in the solution makes the whole batch fail at the start. If the solution is configured correctly, the batch doesn't fail on individual records; empty fields just merge as blanks.
- If the batch fails at the start, check the solution: generate it from one record with the button, and fix any error you see.
- If some records have no file, check that the batch's Document Query returns the records you expect.
- Check DME-LIC-001 and DME-SF-005, and see Large documents, timeouts and limits. The bulk batch size is configurable, so you can run smaller batches.
Who can fix it
| Cause | Who |
|---|---|
| Flow conditions, IDs, custom labels | Your Salesforce administrator |
| Licenses, permission sets, record access | Your Salesforce administrator |
Plan limits, failures with a DME-INT-000 code | Docs Made Easy support |
Still stuck?
Contact support and send:
- your Salesforce Org ID (How to share your Org ID)
- the solution name or ID, the flow name, or the Document Bulk Merge record name
- a link to a record that didn't get its document, and the user who saved it
- the time it happened, with your time zone
- the flow error email or the debug log lines with the error, including any Error code and Reference