Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Limiting Version History on a Document Library

  Asked By: Cara    Date: Oct 13    Category: Sharepoint    Views: 3077

Does anyone have any ideas on how to limit the version history for a document library (ie, I want any particular document to only create up to 10 versions of any particular document)? I would think that this would be a standard feature in WSS, but I can’t seem to find where I can set it.



4 Answers Found

Answer #1    Answered By: Kyla Eckert     Answered On: Oct 13

When the user mouses over/clicks on a document  listing in the doclib,
a dropdown appears with a 'VERSION HISTORY' listing. The code for
that dropdown, its listings and their corresponding functions are
found in this file....60\TEMPLATE\LAYOUTS\1033\ows.js

I would start there. Open it up and search on 'version' to get a feel
for what is there.

We had to manipulate the 'Check out' listing and all the code needed
for that was found in that file. My first 'kneejerk' reaction would
be to suggest possibly passing the number of versions  that you would
want listed in the querystring as it appears in a couple of places in
ows.js ...

function AddVersionsMenuItem(m, ctx, url)
strDisplayText = L_Versions_Text;
strAction = "NavigateToVersionsAspx('" + ctx.HttpRoot
+ "', 'list=" + ctx.listName + "&FileName=" + url +"')";
strImagePath = ctx.imagesPath + "versions.gif";
CAMOpt(m, strDisplayText, strAction, strImagePath);

function NavigateToVersionsAspx(strHttpRoot, strArgs)
STSNavigate(strHttpRoot + "/_layouts/" + L_Language_Text
+ "/Versions.aspx?" + strArgs + "&Source=" + GetSource());

Second suggestion would be to look at 60\TEMPLATE\LAYOUTS\1033
\versions.aspx to see you can modify the number of listings that

Answer #2    Answered By: Alisha Holmes     Answered On: Oct 13

I think this can be done with an Event Handler.


Answer #3    Answered By: Damon Garner     Answered On: Oct 13

I have a utility which you can run on your document  libraries periodically to trim them back to a specific number of versions, but I don’t know of any way of preventing more versions  from being created. Let me know if you want to try the utility out.

Answer #4    Answered By: Percy Beach     Answered On: Oct 13

I believe that there was a version  pruning tool on the SharePoint
Resource Kit CD. You would have to schedule it to run on a periodic

Didn't find what you were looking for? Find more on Limiting Version History on a Document Library Or get search suggestion and latest updates.