@TopParentUNID (JavaScript)

Returns the universal identifier of the top parent of a document.

Defined in

@Functions (Extension Library)

Syntax

@TopParentUNID(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 universal 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.getDocumentByUNID(@TopParentUNID(currentDocument));
return doc.getItemValueString("subject")