Getting the original path of document that is deleted from

Document created by sjoshee on May 12, 2017
Version 1Show Document
  • View in full screen mode
We are working on a report which lists all the folders and documents deleted by the users of each site in Alfresco. We query the archive store to get the list of nodes that are deleted.  But displayPath on the node returns empty. 
In order to get the original path where it is deleted from you have to do following.
var deletedNodeRef = "archive://SpacesStore/b6651c4d-126e-4872-94ff-8a3f81acf5ee";
var node = search.findNode(deletedNodeRef );
var associationNode =["sys:archivedOriginalParentAssoc"];
      var parentNodeRef = associationNode.getChildAssociationRef().getParentRef();
      var parentNode = search.findNode(parentNodeRef);
      logger.log("Display Path " + parentNode.displayPath);
      logger.log("Folder Name " +;
Hope this might help some new Alfresco developer.