cancel
Showing results for 
Search instead for 
Did you mean: 

Building a new path destination for Alfresco Explorer

rtan
Champ in-the-making
Champ in-the-making
Hi there
I need to move a document from one node to another space. Wth the Alfresco Explorer JavaScript API, I am building  the following target path destination the right way?

companyhome.childByNamePath("/myTarget/"+tfolder+"/"+pfolder+"/"+cfolder+"/Draft");

pfolder, tfolder, and cfolder are from a Model I define. These same variables have valid non null values.

I am using Alfresco 3.2 Enterprise.
Thanks
1 REPLY 1

rtan
Champ in-the-making
Champ in-the-making
I should also add the following Javascript code:


dest = companyhome.childByNamePath("/myTarget/"+tfolder+"/"+pfolder+"/"+cfolder+"/Draft");
moveNode(document,dest);


function moveNode (node, destination) {

     if(destination!=null && destination.hasPermission("CreateChildren")){
          logger.log("Permissions "+destination.getPermissions());
       
                   node.move(destination);
    }

Is this code valid in terms of the destination path?