IsDelayUpdates (NotesDatabase - JavaScript™)
Read-write. Indicates whether updates to a server are delayed (batched) for better performance.
Defined in
NotesDatabaseSyntax
isDelayUpdates() : boolean
setDelayUpdates(delay:boolean) : void
Legal value | Description |
---|---|
true |
(default) delays server updates |
false |
posts server updates immediately |
Usage
IfDelayUpdates
is false,
the program waits for updates to the server to be posted. If you set DelayUpdates
to
true, server updates are cached and the program proceeds immediately.
At a convenient time, the cached updates are posted. This makes for
better performance but risks losing the cached updates in the event
of a crash. This method applies to save and remove operations on documents.Set this property each time you open a database. The property is not saved.
The database must be open to use this property.
Examples
This button sets immediate updates before saving documents in the current database.database.setDelayUpdates(false);
var dc:NotesDocumentCollection = database.getAllDocuments();
var doc:NotesDocument = dc.getFirstDocument();
while (doc != null) {
doc.replaceItemValue("owner", session.getEffectiveUserName());
doc.save();
var tmpdoc = dc.getNextDocument();
doc.recycle();
doc = tmpdoc;
}