//add a folder "Archives" where it is needed and create a logAddArchives.txt file in the "root" space
var logFile = space.childByNamePath("logAddArchives.txt");
if (logFile == null) {
logFile = space.createFile("logAddArchives.txt");
}
if (logFile != null) {
logFile.content += "'Archives' folders added in: \n"
}
addArchive(space);
if (logFile != null) {
logFile.content += "Done \n"
}
function addArchive(unEspace) {
var unEspacefils = unEspace.children;
var draft = 0;
for each (i in unEspacefils) {
var nom = i.name;
if (nom == "Drafts") {
draft = 1;
}
}
if (draft == 1 ) {
var archiveFolder = unEspace.childByNamePath("Archives");
if (archiveFolder == null && unEspace.hasPermission("CreateChildren")) {
archiveFolder = unEspace.createFolder("Archives");
if (logFile != null) {logFile.content += String(i.displayPath)+"\n"; }
}
}
for each (j in unEspacefils) {
if (j != null) {
addArchive(j);
}
}
}
J'espère que ca pourra t'aider, mais jette un oeil dans les wikis en anglais ils sont parfois plus complet et avec les exemples ca aide pas mal.Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.