10-08-2012 02:10 AM
10-08-2012 04:09 AM
10-08-2012 04:34 AM
10-08-2012 06:11 AM
10-08-2012 06:15 AM
10-08-2012 06:39 AM
10-09-2012 04:09 AM
// Destination site
var destinationSite = "site2";
// Destination folder
var destinationFolder = "fromSite1";
// Source folder
var sourceFolder = "copyToSite2";
var documentName = document.name;
// Construct destination site path
var destName = "Sites/"+destinationSite+"/documentLibrary/"+destinationFolder;
// Construct source site path
var srcName = space.displayPath;
var fullSrcName = srcName+"/"+sourceFolder;
// Get relative document path
var fullDocumentPath = String(document.displayPath);
var reg = new RegExp(fullSrcName,"g");
var subfolder = fullDocumentPath.replace(reg,"");
var copyPath = "/"+destName+subfolder;
var fullDestDocumentName = copyPath+"/"+documentName;
var destPathChild = companyhome.childByNamePath(copyPath);
var fullDestDocumentChild = companyhome.childByNamePath(fullDestDocumentName);
if (document.isContainer) {
if (null == fullDestDocumentChild) {
document.copy(destPathChild);
}
} else {
if (null != fullDestDocumentChild) {
fullDestDocumentChild.remove();
}
document.copy(destPathChild);
}
10-09-2012 04:29 AM
// récuperation du username de l'utilisateur courant
var utilisateur = person.properties["cm:userName"];
//ajout de la permission Coordinateur sur le noeud courant
document.setPermission("Coordinator", utilisateur );
document.save();
10-09-2012 05:37 AM
10-09-2012 05:47 AM
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.