AnsweredAssumed Answered

Is locked?

Question asked by buurd on Aug 27, 2008
Latest reply on Sep 23, 2008 by buurd
Hi!

When running the javascript below I get the an error saying the a file is locked. If I remove the checkout-line it works perfectly. It doesn't matter where I try to put the working copy. I rather start to think that it is the orginal that is locked somehow. What could be the cause of the problem?

Thanks in advance
Roland


var sourcePath = "myDocuments/Kallelse.dot";

// Attemt to get the node for the sourceDocument
var sourceNode = userhome.childByNamePath(sourcePath);

// Copy the node to the current directory and rename it.
var destinationNode = sourceNode.copy(space);
destinationNode.name = destinationNode.id + ".doc";

// Checkout the document to the currentUsers homespace.
destinationNode.checkout(userhome);

Outcomes