09-04-2006 06:59 AM
var folder = companyhome;
var copy = document.copy(folder);
if (copy != null)
{
copy.name = "new_";
// Add the English category to the document
var nodeRef = "workspace://SpacesStore/666345ce-1d81-11db-b398-13c0b9d26600";
document.properties["cm:locale"] = nodeRef;
copy.save();
}
09-04-2006 07:08 AM
var folder = companyhome;
var copy = document.copy(folder);
if (copy != null)
{
copy.name = "new_";
// Add the English category to the document
var node = search.luceneSearch(……)[0];
document.properties["cm:locale"] = node;
copy.save();
}
09-04-2006 10:56 AM
var nodeRef = search.luceneSearch("TYPE:\"{http://www.alfresco.org/model/content/1.0}category\" AND PATH:\"/cm:generalclassifiable//cm:MyCategory\"")[0];
copy.properties["cm:generalclassifiable"] = nodeRef;
Doesn't work because the copy.properties excepts a collection element. Tried to remove the index ([0]) at the end of the nodRef and to add an index at the end of the copy.properties but this doesn't solve it.09-04-2006 12:56 PM
var categories = new Array(1);
var nodeRef = search.luceneSearch("TYPE:\"{http://www.alfresco.org/model/content/1.0}category\" AND PATH:\"/cm:generalclassifiable//cm:MyCategory\"")[0];
categories[0] = nodeRef;
// … add further categories here to the array
copy.properties["cm:generalclassifiable"] = categories;
09-05-2006 04:04 AM
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.