03-23-2011 06:43 AM
03-24-2011 07:46 AM
03-28-2011 07:27 AM
05-10-2011 06:04 AM
var parentNodeId = 'User Homes/',
spaceName = 'facturas',
spaceTitle = "Carpeta de pruebas" ,
spaceDescription = "Descripcion de la carpeta de pruebas"
var nodeNew;
var nodeParent = search.findNode("workspace://SpacesStore/" + parentNodeId);
nodeNew = nodeParent.createFolder(spaceName);
// Always add title & description, default icon
nodeNew.properties["cm:title"] = spaceTitle;
nodeNew.properties["cm:description"] = spaceDescription;
nodeNew.properties["app:icon"] = "space-icon-default";
nodeNew.save();
"message" : "04100347 Failed to execute script 'workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c': 04100346 TypeError: Cannot call method \"createFolder\" of null (workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c#8)",
"exception" : "org.alfresco.scripts.ScriptException - 04100347 Failed to execute script 'workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c': 04100346 TypeError: Cannot call method \"createFolder\" of null (workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c#8)",
05-10-2011 07:56 AM
var nodeParent = search.findNode("workspace://SpacesStore/" + parentNodeId);
05-12-2011 11:27 AM
var num=space.children.length;
var nodeNew1;
nodeNew1 = space.children[num-1].createFolder('facturas');
nodeNew1.properties["cm:title"] = "Facturas";
nodeNew1.properties["cm:description"] = "Carpeta para las facturas";
nodeNew1.properties["app:icon"] = "space-icon-default";
nodeNew1.save();
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.