How To: View Document Versions in the Documents LWC
Last updated
Was this helpful?
The View Document Versions feature in the Documents (S-Docs) Lightning Web Component allows users to view and manage version history for generated documents directly from a Lightning record page.
Each time a document is refreshed or updated using supported actions, S-Docs automatically creates a new version of the document while preserving earlier versions for reference, comparison, and audit purposes.
To allow users to view document version history, versioning must be enabled in the component configuration.
To enable document versions:
Open Lightning App Builder.
Edit the record page.
Select the Documents (S-Docs) component.
Enable Show Versions.
Click Save and activate the page.
Once enabled, users will see a Versions option next to generated documents in the Documents LWC.
Document versions are automatically created when:
A document’s data is refreshed using Refresh Data
A document is updated using the Live Edit feature (if enabled)
Each version represents a snapshot of the document at that point in time.
Once versioning is enabled, users can view previous versions directly from the record page.
To view document versions:
Navigate to the record page.
Locate the document in the Documents (S-Docs) component.
Click the Versions option for the document.
A list of available versions is displayed on a pop up screen.
Select a version to view or download it.
The most recent version is shown as the active version by default.
Viewing document versions allows users to:
Track changes made to documents over time
Compare previous and updated document content
Restore or reference earlier versions if needed
Maintain an audit trail for compliance and approvals
Considerations
Document versions are only visible when Show Versions is enabled.
New versions are created by Refresh Data and Live Edit actions.
Versioning does not apply to HTML email templates.
Runtime Prompts and Job Splitters are not compatible with document versioning.
Version history is associated with the same Salesforce record.
For optimal usage:
Enable Show Versions alongside Show Refresh
Place the Documents (S-Docs) LWC below the Generate Documents (S-Docs) LWC
Enable versioning for records where document accuracy and traceability are important
This configuration allows users to generate, update, review, and track documents efficiently without leaving the record page.
Last updated
Was this helpful?
Was this helpful?

