How To: View Document Versions in the Documents LWC
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.
Enabling Document Versioning
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.
How Document Versions Are Created
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.
Viewing Document Versions
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.
Benefits of Document Versioning
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
Recommended Configuration
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?

