NXSL:FindNodeObject

From NetXMS Wiki
Jump to navigation Jump to search
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Find node object by node id or node name.


Syntax

FindNodeObject(node, id);


Parameters

node Node object, you can use predefined variable $node to refer to current node. You can also use null as node if trusted nodes check is disabled (see Security Issues for more information).
id ID or name of the node to find.


Return Value

Node object with given id or name on success or null on failure (either because node with given name/id does not exist, or access to it was denied).


Examples

FindNodeObject($node, "server.netxms.org")	-> object
FindNodeObject(null, 12)			-> object
FindNodeObject($node, "bad_node_name")		-> NULL