sign (NotesDocument - JavaScript)

Signs a document.

Defined in

NotesDocument

Syntax

sign() : void

Usage

If you want the signature to be saved, you must call the save method after signing the document.

If the code is running on a server, the signer must be listed in "Run unrestricted methods and operations" under the Security tab in the Server record of the Domino® Directory. Otherwise the following error occurs: You must have permission to sign documents for server based agents.

Examples

This button creates a new document and signs it.
var doc:NotesDocument = database.createDocument();
doc.appendItemValue("Form", "main");
doc.appendItemValue("subject", requestScope.query);
doc.sign();
doc.save();
requestScope.status = "Document signed by " + doc.getSigner();
requestScope.status += "\nDocument verified by " + doc.getVerifier();