> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/automation-and-document-lifecycle/automate-with-flow/how-to-live-edit-with-flows-updated.md).

# Open Generated S-Docs in Live Edit from Screen Flow

Use this guide when you want a **Screen Flow** to open an existing generated **S-Doc** in **Live Edit**.

Use this pattern in **Experience Cloud** when users need guided access to editable documents.

{% hint style="info" %}
This Flow opens an existing generated **S-Doc**.

It does not generate a new document.

Live Edit currently supports PDF / PDF-Upload formats.
{% endhint %}

#### Start here if you are newer to Flow

New to Flow? Start with [Getting Started: Automate Document Generation](/quick-start/document-generation/getting-started-automate-document-generation.md).

### Prerequisites

* A **Screen Flow**
* A template with **Allow Edit** enabled
* A generated **SDoc** record from that template
* Access to the **Flow**, base record, related **SDoc** record, and generated file
* Two screen table components that each allow one selected row

<figure><img src="/files/9cb385fe740378199439605778fe0fc955540828" alt="Screen Flow outline for Live Edit" width="375"><figcaption></figcaption></figure>

### Step-by-step tutorial

#### Step 1: Create or open the Screen Flow

Open **Flow Builder**.

Create a **Screen Flow**, or open an existing one.

Use a **Screen Flow** because users must choose a record and a document on Flow screens.

{% hint style="info" %}
**Admin Tip:** If this Flow runs from a record page, create a **Text** variable named `recordId`. This name is case-sensitive. Then enable **Available for input**.
{% endhint %}

#### Step 2: Get the records users can work with

Add a **Get Records** element for the records users should see.

Filter for the records this experience should expose.

Sort the results in descending order.

Choose **Store all records**.

#### Step 3: Add the first selection screen

Add a **Screen** element with a table component.

Show the record collection from the first **Get Records** element.

Allow one selected row.

Add another **Get Records** element after the screen.

Use the selected row value to store one base record for later steps.

#### Step 4: Get the related S-Docs and let the user choose one

Add a **Get Records** element for **SDoc** records.

Filter the **SDoc** object for documents related to the selected base record.

Return only documents the user should be able to edit.

Add a second **Screen** with a table component.

Show the returned **SDoc** records.

Allow one selected row.

#### Step 5: Add the SDoc Edit Live component

Add a final **Screen** element.

Drag the **SDoc Edit Live** component onto the screen.

Map the selected **SDoc ID** into the component.

Make sure you pass the selected row from the **SDoc** table, not the base record ID.

#### Step 6: Save, activate, and place the Flow

Save the **Flow**.

Activate it.

Add the **Flow** to the target page in **Experience Builder**.

Then test the full path and confirm users can:

* select a record
* select a related **S-Doc**
* open the document in **Live Edit**

#### Step 7: Confirm access and sharing

Grant the target profile or permission set access to the **Flow**.

Make sure users can access the base record.

Make sure users can access the related **SDoc** record.

Make sure users can access the generated file used by **Live Edit**.

If any one of these is missing, the Flow can open while the document list or editor fails to load.

### Troubleshooting and common errors

<details>

<summary><strong>The S-Doc table is empty</strong></summary>

* **Symptom:** The first record selection works, but no **SDoc** records appear on the next screen.
* **Cause:** The **Get Records** filter does not match the selected base record, or the user cannot access the related **SDoc** records.
* **Fix:** Check the related record filter first. Then confirm object access, record sharing, and file visibility for the target user.

</details>

<details>

<summary><strong>The Live Edit screen opens, but the document does not load</strong></summary>

* **Symptom:** The final screen opens, but the editor is blank or does not load the selected file.
* **Cause:** The mapped **SDoc ID** is blank, invalid, or taken from the wrong screen component.
* **Fix:** Confirm the **SDoc Edit Live** component receives the selected **SDoc** row value from the second table.

</details>

<details>

<summary><strong>The Flow works for admins, but not for site users</strong></summary>

* **Symptom:** Admins can open and edit the document, but **Experience Cloud** users cannot.
* **Cause:** The site user is missing access to the **Flow**, base record, **SDoc** record, or generated file.
* **Fix:** Review **Experience Cloud** sharing, Flow access, and file visibility. Then retest as the target user.

</details>

<details>

<summary><strong>The editor opens, but users cannot save edits</strong></summary>

* **Symptom:** The document loads in **Live Edit**, but users cannot make or save changes.
* **Cause:** The source template does not have **Allow Edit** enabled, or the file format is unsupported.
* **Fix:** Enable **Allow Edit** on the template that generated the document. Then confirm the file is **PDF** or **PDF-Upload**.

</details>

### Advanced configurations and reference

* Field-level action details: [Flow Reference](/developer-hub/document-workflows/flow-reference.md#live-edit-screen)
* **Supported formats:** **PDF** and **PDF-Upload**
* **Required template setting:** **Allow Edit**
* **Required component input:** the selected **SDoc ID**
* Use [Configure Live Editing](/sdocs/automation-and-document-lifecycle/live-edit.md) for template setup details
* Use [Using Salesforce Flows with S-Docs in Experience Cloud](/sdocs/automation-and-document-lifecycle/experience-cloud-site-setup-for-community-users-with-s-docs/using-salesforce-flows-with-s-docs-in-experience-cloud.md) for site setup details


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sdocs.com/sdocs/automation-and-document-lifecycle/automate-with-flow/how-to-live-edit-with-flows-updated.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
