Difference between revisions of "NXSL:GetDCIObject"

From NetXMS Wiki
Jump to navigation Jump to search
m (Text replacement - "^" to "{{deprecated}}")
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__NOTOC__
Return DCI object or null.
Get DCI object with given ID.


== Syntax ==
== Syntax ==
Line 13: Line 13:
| ''node'' || [[NXSL: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 [[SG:Security Issues|Security Issues]] for more information).
| ''node'' || [[NXSL: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 [[SG:Security Issues|Security Issues]] for more information).
|-
|-
| ''id'' ||  [[NXSL:DCI|DCI]] id on node.
| ''id'' ||  DCI id on node.
|}
|}


Line 19: Line 19:
== Return Value ==
== Return Value ==


[[NXSL:DCI|DCI]] object with given id on success or '''null''' on failure (if id does not exist, or access to it was denied).
[[NXSL:DCI|DCI]] object with given id on success or '''null''' on failure (if object with given id does not exist, or access to it was denied).




Line 25: Line 25:


  GetDCIObject($node, 2)                 -> object
  GetDCIObject($node, 2)                 -> object
  FindNodeObject($node, "bad_id") -> NULL
  GetDCIObject($node, bad_id) -> NULL

Latest revision as of 18:13, 13 September 2022

This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Get DCI object with given ID.

Syntax

GetDCIObject(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 DCI id on node.


Return Value

DCI object with given id on success or null on failure (if object with given id does not exist, or access to it was denied).


Examples

GetDCIObject($node, 2)	                -> object
GetDCIObject($node, bad_id)		-> NULL