javascript - Alfresco: Add a tag based on the location of the document -


i've been struggling little script should easy implement: i've added rule on folder runs script. script should folderlocation of uploaded or incoming document , add location tag:

var url = document.properties.locale.noderef; document.addtag(url); 

it should this, doesn't work. how should it?

your code should follow.first try code replace logic add path.

if (!document.hasaspect("cm:taggable")) document.addaspect("cm:taggable");   document.addtag("test"); 

you can replace "test" accessed path of document.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -