02-19-2010 02:56 PM
try{
if(!document.isContainer){
var dossier1=space.parent.parent.properties.name
var dossier2=space.parent.parent.parent.properties.name
var dossier3=space.parent.parent.parent.parent.properties.name
if(dossier1== "Sites")
var dossier=space.parent.properties.name;
if(dossier2== "Sites")
var dossier=dossier1;
if(dossier3== "Sites")
var dossier=dossier2;
var group = people.getGroup("GROUP_site_"+dossier+"_SiteCollaborator");
var persons = people.getMembers(group);
for each (person in persons){
if(person.properties.userName != "admin" && person.properties.userName != "guest"){
var email = person.properties.email;
if(email)
sendMail(email);
}
}
}
}
catch(exception){
throw exception;
}
function sendMail(email){
// create mail action
var mail = actions.create("mail");
mail.parameters.to = email;
mail.parameters.subject = "Nouveau document dans l'espace " + dossier + ".";
mail.parameters.from = "admin@alfresco.fr";
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Email_notification_doc_espaces.ftl");
mail.parameters.text =Erreur template ; //"some text, in case template is not found" ;
// execute action against a document
mail.execute(document);
}
<#assign dossier1=space.parent.parent.name>
<#assign dossier2=space.parent.parent.parent.name>
<#assign dossier3=space.parent.parent.parent.parent.name>
<#if dossier1== "Sites">
<#assign dossier=space.parent.name>
<#elseif dossier2== "Sites">
<#assign dossier=dossier1>
<#elseif dossier3== "Sites">
<#assign dossier=dossier2>
</#if>
Bonjour,
Un nouveau document nommé "${document.name}" a été ajouté par ${person.properties.firstName} <#if person.properties.lastName?exists> ${person.properties.lastName}</#if> dans le dossier "${dossier}".
Cliquer ici pour accéder à ce document : http://serveur/share/page/site/${dossier}/document-details?nodeRef=${document.nodeRef}
Cliquer ici pour accéder à la GED : http://serveur/share
02-22-2010 02:56 AM
03-11-2010 03:15 AM
04-07-2010 03:36 AM
04-07-2010 04:35 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.