GetNodeParents()
GetNodeParents(node): Array
Get accessible parent objects for given 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);
}