As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<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();