I hope to append the creator and "create time" to a file name while I create a document from a template. For example: template name: reimbursement-record.xls After the file created, file name changed to: reimbursement-record-Smith-20140214.xls
Hi For rule,At first,I have writen a XXX.js,Second executes the custom javascript on content update,but it doesn't work,could you tell me why? is there something wrong in the XXX.js? Thanks in advances! the XXX.js code as following:
var versionHistory = document.versionHistory; if (versionHistory != null) { var version = versionHistory[0]; var creator = version.creator; var createdDate = version.createdDate; document.name = document.name +"-"+ creator +"-"+ createdDate; document.save(); }
Hi At first,thanks for your solution and I have writen code like this,but is still doesn't work,could you tell me where is error? Thank you very mush! this code as following like this var aspects = document.aspects; for(s in aspects){ if(s!=null && s=="auditable"){ document.name += s.properties.creator; document.name += s.properties.created; break; } } document.save();