AnsweredAssumed Answered

JavaScript to move a doc to a given path

Question asked by jlabuelo on May 18, 2015
Hi there

I am trying to create an inbound rule in a Share 5.0 space so every document is moved to a given path depending on a property value of the type of the document.

The script created to do so seems to be quite easy, but we do not get it to work at all.

   logger.log ("———–COMIENZO————-");
   var departamento =["hula:departamento"];
   logger.log ("Departamento: "+departamento);
   var departamentoJefe = companyhome.childByNamePath("HULA/Departamentos Jefes/"+departamento);
   logger.log ("Node Jefe: "+departamentoJefe);

   if ((doc != null))
      logger.log ("El documento no existe");
      logger.log ("Movido");


We also are not able to lauch the JAvaScript debugger in Alfresco Share.

Any suggestions about how can we move the document to a known given space??

Thanks a lot