Get URL to View Version History of an Item

Applies To: Custom Actions and NITRO Workflows

Description

SharePoint item version history is a feature that automatically tracks changes made to documents or list items in a SharePoint document library or list. Each time an edit is made, a new version is created, allowing users to view, restore, or compare different states of an item.

Use case: URL to View Version History of an Item

Sample URL to view version history of a list item:

https://contoso.sharepoint.com/sites/IT/_layouts/15/Versions.aspx?list=4859a10b-c22a-4bc4-9f84-2bd177e9e1ad&ID=1

Configure column mappings as shown below to build above URL using expression builder:

Fixed value used in third row in above expression:

/_layouts/15/Versions.aspx?list=

Sample Use case: Send URL in email to view version history of an item.

Custom Action:

Define Variable:

Set Variable:

Expression Builder:

Below configuration will be same for custom actions and NITRO workflows.

Send Mail Action:

Configure Send Mail action to send URL to view version history of an item as shown below:

Mail Template:

Hyperlink: Configure hyperlink as shown below

Web address: %%VariableName##Value%%

Sample Output:

Sample Version History URl of an item by clicking above link will be Like this: [Site URL] /_layouts/15/Versions.aspx?list=4c405ab4-24ed-4766-9298-4bb4a9e85a28&ID=1