@TopParentID (JavaScript)

Returns the Notes® identifier of the top parent of a document.

Defined in

@Functions (Extension Library)

Syntax

@TopParentID(doc:any) : string
Table 1. Parameters
Parameter Description
doc:any A document in the data store. Can be of type NotesDocument or NotesXspDocument.
Table 2. Return value
Value Description
string The Notes® identifier of the top parent of the document.

Usage

In a hierarchy of documents, each child document has a $REF item that points to its parent document. Following the $REF hierarchy to the end accesses the top parent.

Examples

This computed field displays an item value from the top parent of the current document.
var doc:NotesDocument = database.getDocumentByID(@TopParentID(currentDocument))
return doc.getItemValueString("subject")