cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Change Document Name From Workflow

jarrett
Champ in-the-making
Champ in-the-making
Hello,

Does anyone know how to change the name of a document from inside an advanced workflow? I would like to change the Name of a document to the sys:node-dbid, or a unique ID number.


var DocID = "xxx";

     for (var i = 0; i < bpm_package.children.length; i++) {
     bpm_package.children[i].properties["ygrd:DocumentTitle"] = DocID;
     bpm_package.children[i].save();
}

Allows me the change the title in my custom model, but I'd like to change the Name of the Document instead. The purpose of this is to try an assign each document a unique ID number. Any help or insight will be greatly appreciated.
1 REPLY 1

mabayona
Champ on-the-rise
Champ on-the-rise
What about with:

bpm_package.children[i].properties["cm:name"] = DocID;
bpm_package.children[i].save();