...
Using the structural metadata for tree navigation one can fetch the (direct) children of a record or get the grandparents of a record.
Reference Codes & Has (Non Representation) Children
The metadata field
Structural.ReferenceCodes
is an ordered multi-item field (see Complex Fields) containing the record IDs from the parents, starting from the oldest / first.
...
Once a record obtains its first child the field
HasChildren
will be set to true for the parent. Even if the child is later on permanently deleted, the fieldHasChildren
will betrue
forever on the parent.Data objects, e.g., the record type Media, always have HasChildren set to true because it has direct (grand)children representations. In order to know whether the data object has other data objects that are children, e.g. emails with attachments, a new field
HasNonRepresentationChildren
has been introduced in version23.4
.
Navigation
From child to parent
...