GetNodeParents()

Deprecated in 3.0.

Please use parents attribute of NetObj class.

GetNodeParents(node): Array

Get accessible parent objects for given node.

Table 1. Parameters

node

Node

Node object

Return

Array of objects of class NetObj or inherited from it, with first object placed at index 0. Templates and parents the script has no read access to are not included. null if the script has no read access to the node.

// Log names and ids of all accessible parents for current node
parents = GetNodeParents($node);
for (p : parents)
{
	trace(1, "Parent object: name='" .. p.name .. "' id=" .. p.id);
}