AnsweredAssumed Answered

node metadata is reverting on restart,

Question asked by supratim on May 29, 2013
Latest reply on May 29, 2013 by supratim
Hi all,
I am using following webscript to make change to metadata of a node..
using

<javascript>
notenode.properties['cmc:fileNoteDesc']=textx; 
</javascript>

here is the full code…

<javascript>
function main() {
 
  var noteid=args.nid;

  var textx=args.ncont;

  var notenode=getFileNoteById(noteid);

  notenode.properties['cmc:fileNoteDesc']=textx;  

  notenode.save();  

  model.msg = "Updated   #"+noteid;
     
}


function getFileNoteById(fileNoteId)
{
   var searchResult = new Array();

   var qry="";
   qry+='TYPE:"{com.cmc.model.repository}fileNoting"';
   qry+=" AND @cmc\\:fileNoteId:"+fileNoteId;

   var sNode = search.luceneSearch(qry);
   if(sNode[0] !=null)
   {
      return   sNode[0];   
   }else{
           return null;
   }
   
}


main();

</javascript>

Change is reflected in alfresco until restart.
Once restarted node has the old value in metadata.
Please help!

Outcomes