04-07-2007 11:23 AM
04-07-2007 03:00 PM
04-09-2007 03:44 PM
04-12-2007 09:36 AM
var docCreator = document.properties.creator;
var docCreatorMail = people.getPerson(docCreator).properties["cm:email"];
var childList = new Array(30);
var childList = document.children;
try {
var grandchildList = new Array(30);
var grandchildList = childList[0].children;
var greatgrandchildList = new Array(30);
var greatgrandchildList = grandchildList[0].children;
var docDiscussion = childList[0].properties;
var docTopic = childList[0].properties["fm:topic"];
var docPost = childList[0].properties["fm:post"];
}
catch (ex) {
var isPostMessage = "false";
}
var mail = actions.create("mail");
mail.parameters.to = docCreatorMail;
mail.parameters.subject = "Rejected Document: " + document.properties.name;
mail.parameters.from = "axl@gnr.com";
mail.parameters.text = "Document '" + document.properties.name + "' has been rejected. ";
// check if there's a discussion thread for this item, and display appropriately
if ("false" == isPostMessage) {
mail.parameters.text += "There is no discussion thread for this item.";
}
else {
mail.parameters.text += "The discussion thread is below.\n\n";
mail.parameters.text += "Topic: " + grandchildList[0].name + "\n\n";
var i;
var tmptxt;
for (i=greatgrandchildList.length-1; i >= 0 ; i–)
{
tmptxt = greatgrandchildList[i].name;
// transform the html to text
tmptxt = greatgrandchildList[i].transformDocument('text/plain');
mail.parameters.text += "Message " + (i+1) + ": " + tmptxt.content + "\n";
// remove the temp file
tmptxt.remove();
}
}
mail.execute(document);
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.