cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve string properties values for incoming email

marcello_modica
Champ in-the-making
Champ in-the-making
Im going crazy… i try to write javascript for create folder with same name as the just arrived innound email subject. This is the script:



var id = companyhome.id;
var name = companyhome.name;
var type = companyhome.type;
var noderef = companyhome.nodeRef;
var childList = companyhome.children;
var properties = companyhome.properties;
var assocs = companyhome.assocs;


/* //Imposto il documento mail come HTML */
document.mimetype="text/html";


// /* /* //Creo Una directory denominandola esattamente con il nome dell'oggetto della mail */

var newRNCFolderName = new String(document.properties["cm:subjectline"].content);
var newRNCFolder = space.createFolder(newRNCFolderName );


I can create the folder withOUT problem if i set a fixed string in crateFolder function. The script is executed in rule/action when document update and NOT in backgroud.
How i can retrieve the "cm:subjectline" string value and pass it to createFolder function.
Regrads.
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
This should work

var newRNCFolderName = document.properties["cm:subjectline"];
var newRNCFolder = space.createFolder(newRNCFolderName);