03-24-2010 11:47 AM
if (document.isDocument){
var targetNode = space.childByNamePath("targetNode");
if (targetNode == null && space.hasPermission("CreateChildren")){
targetNode = space.createFolder("targetNode");
}
if (targetNode != null && targetNode.hasPermission("CreateChildren")){
var docObsoleto = targetNode.childByNamePath(document.name);
if (docObsoleto == null){
docObsoleto = document.copy(targetNode);
docObsoleto.addAspect("cm:versionable");
}
if (docObsoleto != null){
if (docObsoleto.isVersioned) {
var workingCopy = docObsoleto.checkout();
workingCopy.content = document.content;
docObsoleto = workingCopy.checkin('Old version');
}
}
}
}
03-24-2010 06:29 PM
03-25-2010 04:38 AM
…
if (docObsoleto == null){
docObsoleto = document.copy(targetNode);
docObsoleto.addAspect("cm:versionable");
}
…
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.