setOption (NotesDatabase - JavaScriptâ„¢)
Sets the value of a database option.
Defined in
NotesDatabaseSyntax
setOption(option:int, flag:boolean) : void| Parameter | Description |
|---|---|
| option | One of the following:
|
| flag |
|
Usage
Compact the database to ensure that the option takes effect. See compact.See getOption for getting a database option.
Setting DBOPT_REPLICATEUNREADMARKSTOANY true also sets DBOPT_REPLICATEUNREADMARKSTOCLUSTER true. Setting DBOPT_REPLICATEUNREADMARKSTOCLUSTER true sets DBOPT_REPLICATEUNREADMARKSTOANY false. Setting both options false means unread marks are never replicated.
The database must be open. Otherwise an exception occurs.
Examples
This button toggles the soft delete option.if (database.getOption(NotesDatabase.DBOPT_SOFTDELETE)) {
database.setOption(NotesDatabase.DBOPT_SOFTDELETE, false);
requestScope.status = "Soft deletes turned off";
} else {
database.setOption(NotesDatabase.DBOPT_SOFTDELETE, true);
requestScope.status = "Soft deletes turned on";
}
Language cross-reference
SetOption method in LotusScript® NotesDatabase classsetOption method in Java Database class