You are here

getVersionHistory

getVersionHistory() gets the version history for the current node.

Returns

Version history as a list of ScriptVersion objects.

Example


    var versionHistory;
    var revisionDates = new Array();

    var node = companyhome.childByNamePath("TEST_FILE_1.TXT");

    node.ensureVersioningEnabled(true, true);

    if (node.isVersioned){
        versionHistory = node.getVersionHistory();

        for (var i in versionHistory){
            revisionDates.push(versionHistory[i].createdDate);
        }
    }
      

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.