09-21-2007 10:02 AM
06-02-2008 03:38 PM
The destination node may have different permissions i.e. may be accessable by different users.
// write the content from the current document into the destination
destNode.content.write(document.properties.content);
with:// set the destination to refer to the content from the current document
destNode.properties["cm:content"] = document.properties.content;
09-26-2008 04:39 AM
You should design your script to:
* Check out a working copy of your versioned node.
* Use the new write method to update the content of your working copy.
* Check in your working copy.
// Moves a node to a destination
function moveNode (nodo, destino) {
// Search if exists
var encontrado = destino.childByNamePath(nodo.name);
if (encontrado != null) {
if (! encontrado.hasAspect("cm:versionable")) {
encontrado.addAspect("cm:versionable");
}
var wc = encontrado.checkout();
wc.properties["cm:content"]=nodo.properties["cm:content"];
wc.save();
wc.checkin("Update element: "+nodo.name);
nodo.remove();
}
else
{
nodo.move(destino);
}
}
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.