Sharepoint. Show list version history dialog box

I have a custom page and list item id. How can I show the sharepoint version history dialog from my page?

+3
source share
1 answer

URL format for histoy version page:

http://<Server>/<WebUrl>/_layouts/versions.aspx?list=<ListID>&ID=<ItemId>&FileName<ServerRelativeFileUrl>

Use the SharePoint client API to open the page in a dialog box:

var options = SP.UI.$create_DialogOptions();
options.width = 500;
options.height = 250;
options.url = <url>;

SP.UI.ModalDialog.showModalDialog(options);

For a more detailed example, you should provide a little more context (whether your code is running on the server or client, what code you still have, etc.)

+5
source

All Articles