03-08-2017 02:00 AM
Let's say I have a node id = 38f8475q-9363-466a-8a24-0e36gf5ea1m8 and I require to findout the path corresponding to this document.
Can anyone assist me in the same?
03-09-2017 02:16 AM
You can use ScriptNode API.
First you have to find the doc(by using findNode method)
Then you can use document.displayPath to get path.
Hope this helps!!
03-13-2017 02:48 PM
are you working with the alfresco-js-api library, the new REST services or in the web-script context (I'm asking because you are talking about an id and not about a noderef like workspace://SpacesStore... that you would use if in Web-Script or serverside JS context)
JS-Api has functions called node.getNodeInfo(...) and core.nodesApi.getNode(...) returning a nodeEntry (nodeFull) on GET method, which also returns the node properties
- not shure if there is a property for displayPath, but it should be. Look for the documentation in the alfresco github repository.
If not, you could write a web-script that uses exactly the approach Hardik1512 described. This script could then also be called by the alfresco js api method "core.webscriptApi.executeWebScript"
Explore our Alfresco products with the links below. Use labels to filter content by product module.