For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To: Refresh Document Data Within the Documents

The Refresh Data feature in the Documents (S-Docs) Lightning Web Component allows users to update the data inside an existing document without fully going through the regeneration of the document.

Instead of creating a brand-new document from scratch, Refresh Data re-syncs the document’s merge fields with the latest Salesforce record data and saves the update as a new version of the same document.

This ensures documents remain accurate while preserving their structure, formatting, and history.


How Refresh Data Works

When a document is refreshed:

  • The document template is not re-selected or re-generated

  • The existing document is updated with the latest Salesforce data

  • A new version of the document is created

  • Previous versions remain available for reference (if versioning is enabled)

This allows users to quickly update documents after record changes without repeating the full document generation process.


Enabling Refresh Data

To allow users to refresh documents:

  1. Open Lightning App Builder

  2. Edit the desired record page

  3. Select the Documents (S-Docs) component

  4. Enable Show Refresh

  5. Save and activate the page

Once enabled, the Refresh option appears next to generated documents in the Documents LWC.


Using Refresh Data to Update a Document

To refresh document data:

  1. Navigate to the record page.

  2. Locate the Documents (S-Docs) component.

  3. Select the generated document you want to update.

  4. Click Refresh.

  5. The document is updated with the latest Salesforce data.

The refreshed document is saved as a new version of the existing document, while previous versions remain available (if version history is enabled).


What Happens After Refreshing

After the refresh completes:

  • The document reflects the most current record data

  • The document’s layout and formatting remain unchanged

  • The refreshed version becomes the active version

  • Earlier versions can still be accessed from the Versions menu (if enabled)

This allows users to quickly update documents without regenerating them or leaving the record page.


When to Use Refresh Data

Refresh Data is ideal when:

  • Record field values change after document creation

  • Pricing, dates, or status fields are updated

  • Users need the latest data before emailing or sending for e-Signature

  • Regenerating the document entirely is unnecessary

Considerations

  • Refresh Data does not fully regenerate the document

  • The original template and formatting remain unchanged

  • Refreshing creates a new version, not a separate file

  • Version history is visible only if Show Versions is enabled

  • Runtime Prompts and Job Splitters are not supported

Last updated

Was this helpful?