06-22-2011 08:29 PM
<import resource="/Company Home/Data Dictionary/Scripts/command-utils.js">
function processCommand()
{
var isEmailed = document.hasAspect("emailserver:emailed");
logger.log("Command Processor: isEmailed=" + isEmailed);
if (isEmailed)
{
var attachments = document.assocs["attachments"];
var subject = document.properties["cm:title"];
if (attachments != null)
{
for (var i = 0; i < attachments.length; i++)
{
var randomNumber=Math.floor(Math.random()*99999999);
var doc = space.createNode(randomNumber + ".tiff", "namespace:custom_document");
doc.content = attachments[i];
doc.mimetype = "image/tiff";
doc.properties["namespace:attribute1"]=subject;
doc.save();
}
}
}
}
processCommand();
06-23-2011 08:05 AM
06-23-2011 05:11 PM
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.