Hello community, i have created a rule in a folder that when users add contents to that folder the rule calls a custom script that prepends to all children nodes in that parent folder a specific char, at this point i catch the parent node based on the "document" var node that fired the rule, this works fine when creating or adding content to the folder that has configured the rule, but i need to make this work when deleting a node in that folder, the problem is that i can't get the parent property of the deleted node, I think it's because it does not exist anymore.
does anyone knows hoy can i make this work without leaving hardcoded the parent folder nodeRef?
Thank you for your response Angel Borroy, i have set the flag you told me, but it has not worked for me, i'm wondering if the RootScoped Var `document` is Defined when the rule calls my custom script on node deletion actions, because my script get the parent node based on that variable.
nice! i will try using Behaviors, thanks for the reference link!
I want to share with you that i have try using the RootScoped var "Space" this worked for me, this get me the Folder parent of the uploaded Node that triggers the rule, it defines with the node of the folder where the rule is configured it works fine but i have to redefine the same rule in each folder i want the same functionality, if you link the rule to an existing one, this variable always gets defined with the Folder where the rule war originally created.
think i will continue with the script using this "Space" variable, and if theres no success i will be moving to create a behavior.