03-22-2010 05:28 AM
03-22-2010 06:42 AM
03-24-2010 07:52 AM
03-24-2010 02:10 PM
03-25-2010 04:39 AM
03-25-2010 04:44 AM
03-25-2010 05:31 AM
var strTargetNode = "Obsoletos";
var strDocumentName = document.name;
// Solo para documentos (discrimina espacios)
if (document.isDocument){
// Seteamos el espacio de documentos Obsoletos
var targetNode = space.childByNamePath(strTargetNode);
if (targetNode == null && space.hasPermission("CreateChildren"))
{
targetNode = space.createFolder(strTargetNode);
}
if (targetNode != null && targetNode.hasPermission("CreateChildren"))
{
var docObsoleto = targetNode.childByNamePath(strDocumentName);
if (docObsoleto == null)
{
docObsoleto = document.copy(targetNode);
docObsoleto.addAspect("cm:versionable");
}
if (docObsoleto != null && docObsoleto.isVersioned)
{
var workingCopy = docObsoleto.checkout();
workingCopy.content = document.content;
workingCopy.mimetype = document.mimetype;
docObsoleto = workingCopy.checkin('Documento Obsoleto');
}
}
}
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.