ParentDocumentUNID (NotesDocument - JavaScript)

Read-only. The universal ID of a document's parent, if the document is a response. Returns an empty string if a document doesn't have a parent.

Defined in

NotesDocument

Syntax

getParentDocumentUNID() : string

Usage

When used in conjunction with getDocumentByUNID in NotesDatabase, this property allows you to get the parent document for any document.

For more information on universal IDs, see getUniversalID.

Examples

This computed field displays the response status of the current document.
var doc:NotesDocument = currentDocument.getDocument();
return doc.isResponse() ?
"Response to " + database.getDocumentByUNID(doc.getParentDocumentUNID()).getItemValueString("subject") : 
"Main document";