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.
try { if(!document.isContainer){ //Récupération du nom du document var nomDocument = document.properties.name; //Traitement du nom du document var mois = nomDocument.substring(0,2); var typedocument = nomDocument.substring(2,nomDocument.length-4); //nomDocument.length-4 pour retirer ".pdf" //On récupere le noeud bl (présent à la racine du companyhome) var nodeDossierbl = companyhome.childByNamePath("/st:sites/cm:sodip/cm:documentLibrary/cm:CAGNES/cm:Client/cm:AB3E/cm:BON_x0020_LIVRAISON"); if (nodeDossierbl != null){ var nodemois = nodeDossierbl.childByNamePath(mois); //Test si le space existe if(nodemois == null){ //On créé le dossier mois : n°XX s'il n'existe pas nodemois = nodeDossierbl.createFolder(mois); } //On déplace le fichier document.move(nodemois); } } } catch(exception) { throw exception; }