getDocument (NotesXspDocument - JavaScript)

Gets the document as a NotesDocument object.

Syntax

getDocument() : NotesDocument (JavaScript)

getDocument(applyChanges:boolean) : NotesDocument (JavaScript)

Parameter Description
applyChanges true applies any changes made to the data store; false (default) does not apply changes.
Return value Description
NotesDocument The document.

Examples

This button onclick event gets the XML for the document (updated with any changes made in the data store) associated with the current XPage. Elsewhere on the XPage requestScope.xml is bound to a multiline edit box.
requestScope.xml = document1.getDocument(true).generateXML()