What is a way to get the Node object from inside the JavaScript being executed by a rule

cancel
Showing results for 
Search instead for 
Did you mean: 
Scorpios
Customer

What is a way to get the Node object from inside the JavaScript being executed by a rule

Jump to solution

Hi All,

I have a rule that executes a javascript when a document is dropped into a folder.

Inside the javascript I have accesss to the document object.

I am looking for a way to get a handle to the node object for the document that the rule is running against.

Thanks

 

1 Solution

Accepted Solutions
afaust
Master

Re: What is a way to get the Node object from inside the JavaScript being executed by a rule

Jump to solution

The document object in the rule JavaScript is the node object. I don't know what other handle you want to have. The only other reference you would be able to get is the NodeRef via the document.nodeRef property accessor.

View solution in original post

2 Replies
afaust
Master

Re: What is a way to get the Node object from inside the JavaScript being executed by a rule

Jump to solution

The document object in the rule JavaScript is the node object. I don't know what other handle you want to have. The only other reference you would be able to get is the NodeRef via the document.nodeRef property accessor.

Scorpios
Customer

Re: What is a way to get the Node object from inside the JavaScript being executed by a rule

Jump to solution

Thank you.

That was the missing piece of knowledge I didn't know. 

I didn't realize they were the same.