NestedIntervalUtils - changeParent(GlideRecord node, String newParentID)

Changes the parent of the given node to the record identified by the sys_id specified in the newParentID parameter, and recalculates the tree values for the record and all of its descendants.

Table 1. Parameters
Name Type Description
node GlideRecord Record of the node whose parent is to be changed
newParentID String sys_id of the new parent for the record
Table 2. Returns
Type Description
Number Status:
  • 1 = success
  • 2 = duplicate (relationship already exists)
  • 3 = recursive
  • 4 = invalid data
  • -1 = database error