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?
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!!
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"
Retrieving data ...