As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var resultNode = search.findNode("workspace://SpacesStore/" + "6e5dabc3-fe8a-4c5e-b470-5c2484720e45"); var versionHistory = resultNode.versionHistory; var majorVersion = 1.0; var sourceVersion; for (i = 0; i < versionHistory.length; i++) { var version = versionHistory; if (version.label == majorVersion) { sourceVersion = version; break; } } var historyNode = search.findNode(sourceVersion.nodeRef); var workingCopy = resultNode.checkout(); workingCopy.content = sourceVersion.content; workingCopy.checkin("Major Version", true);