AnsweredAssumed Answered

Access space node from JavaScript if rules are applied

Question asked by redomancer on Nov 23, 2011
Latest reply on Nov 23, 2011 by openpj
The situation:
1) I have to execute some JavaScript script for space if some criteria are met, for example, if space aspect data are filled; thos must be done also for all sub spaces; to achieve that, a rule has been created for top level space with option "rule applies to subfolders" which executes script;
2) the proble - from sript its impossible to access the current space!!

If we check documentation, there said:

space - The current space Script Node (if any). Note that for a script executing from a rule, the space object will be the space that the rule resides in, this may not be the space you are expecting if the rule is inherited.

So how can I access the current space node, not top one on which rule was applied? In documentation I cant see any of objects which could help. Is there a solution for this problem?