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.
//Get category node var nodeRef = search.luceneSearch("…"); //Get categories from file var cats = file.properties["cm:categories"]; //Add new category cats.push(nodeRef); //Update file categories file.properties["cm:categories"] = cats;
Java class "java.lang.Object" has no public instance method or field named "1".
//Get category node var nodeRef = search.luceneSearch("…"); //Get categories from file var cats = file.properties["cm:categories"]; //Add new category var newCats = new Array(); for (var i=0; i<cats.length; i++) { newCats[i] = cats[i]; } newCats.push(nodeRef); //Update file categories file.properties["cm:categories"] = newCats;
var catNodeRef = search.luceneSearch("…"); var cats = document.properties["cm:categories"]; var newCats = new Array(); for (var i=0; i < cats.length; i++) { newCats[i] = cats[i]; } newCats.push(catNodeRef); document.properties["cm:categories"] = newCats; document.save();
var catNodeRef = search.luceneSearch("…");
var catNodeRef = search.luceneSearch("…")[0];