Sunday, 4 September 2011

Get file versions Ecmascript\Javascript client Object model sharepoint 2010

You can use SP.FileVersionCollection to get SP.FileVersion object of a SP.File

Usage -

var currentItem = ListEnumerator.get_current();
var _contentType = currentItem.get_contentType();
if(_contentType.get_name() != “Folder”)


var File = currentItem.get_File();
if(File != null) {
FileVersionCollection versions = File.Versions
foeeach(FileVersion _version in versions)

Ads by Google

1 comment:

  1. This does not work

    FileVersionCollection object returns "undefined" or null.... even though my documents have multiple published versions.

    Any idea?