save (NotesDocument - JavaScript™)
Saves any changes you have made to a document.
Defined in
NotesDocumentSyntax
save() : boolean
save(force:boolean, makeresponse:boolean) : boolean
save(force:boolean, makeresponse:boolean, markread:boolean) : boolean
Parameter | Description |
---|---|
force |
If true, the document is saved even if someone
else edits and saves the document while the program is running. The
last version of the document that was saved wins; the earlier version
is discarded. If false, and someone else edits the document while
the program is running, the makeresponse argument
determines what happens. |
|
If true, the current document becomes a response
to the original document (this is what the replicator does when there's
a replication conflict). If false, the save is canceled. If the force parameter
is true, the makeresponse parameter has no effect. |
|
If true, the document is marked as read. If false (default), the document is marked as unread. |
Return value | Description |
---|---|
boolean |
True if the document is successfully saved; false otherwise. |
Examples
This button creates a new document in the current database and appends an item namedSubject
with
the value of a requestScope
variable. The requestScope
variable is bound to an edit box that the user fills in before clicking
the button.var doc = database.createDocument();
doc.appendItemValue("Subject", requestScope.subject);
doc.save()