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.
resultString = "create_space.failed"; var parentNodeId = 'User Homes/', spaceName = 'facturas', spaceTitle = "Carpeta de pruebas" , spaceDescription = "Descripcion de la carpeta de pruebas" templateId = ''; var nodeNew; if ((spaceName == null) || (spaceName == "")) { resultString = "create_space.missing_name"; } else { var nodeParent = search.findNode("workspace://SpacesStore/" + parentNodeId); // Copy from template? if ((templateId != null) && (templateId != "")) { nodeTemplate = search.findNode("workspace://SpacesStore/" + templateId); nodeNew = nodeTemplate.copy(nodeParent, true); nodeNew.name = spaceName; } else { 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(); // Add uifacets aspect for the web client nodeNew.addAspect("app:uifacets"); if (nodeNew != null) { resultString = "space_created"; resultCode = true; } }
"exception" : "org.alfresco.scripts.ScriptException - 04100119 Failed to execute script 'workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c': 04100118 TypeError: Cannot call method \"createFolder\" of null (workspace:\/\/SpacesStore\/6b697df7-38b1-4a87-804d-5426c80d8b1c#29)",