FindNodeObject(currentNode, key) => Node
Look up [class-node] object by either name or object id, will return null
if object not found or not accessible.
This function search for nodes only.
If trusted node validation is enforced, currentNode
should point to execution context object (instance of [class-netobj], $node
in most cases).
If trusted nodes are disabled (default server configuration), currentNode
can be set to null
.
currentNode |
Lookup context or |
key |
Object name of id. |
Return
Instance of [class-node] object or null
if not found or not accessible.
Example
>>> FindNodeObject($node, "server.netxms.org") object >>> FindNodeObject(null, 12) object >>> FindNodeObject($node, "bad_node_name") NULL