cancel
Showing results for 
Search instead for 
Did you mean: 

Get current space from JavaScript via inherited rule

chicco0386
Champ on-the-rise
Champ on-the-rise
Hi all,
I've read in the Alfresco JavaScript wiki that the javaScript command "space" return the nodeRef of the space where the rule is defined, so if I've this schenario:
–> Folder (defined rule)
–> –> SubFolder (inherited rule)

and the script is execute in the "SubFolder" and I have the command "space" it refers correctly to the space "Folder", but I want a reference to "SubFolder".

Now, I ask you if there is a work-around for get the current space inside javaScript executed by an inherited rule.

CAN YOU HELP ME?

THANK YOU
1 REPLY 1

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
if you are woriking with the documents inside a script, you can get document.parent.
so if item was added inside subfolder with parent you would get subfolder.