Event sequencing

The following table shows the sequencing of events during common Notes tasks.

Task

Sequence of events

Changing modes (edit/read) in a document

QueryModeChange (Form)

PostModeChange

Closing a database

QueryClose

Terminate

[optional] Script Library Terminate

Closing a database from a view

QueryClose (View)

Terminate (View)

Globals Terminate (View)

[optional] Script Library Terminate (View)

QueryClose (Database)

Terminate (Database)

[optional] Script Library Terminate (Database)

Closing a document

QueryClose (Form)

onUnload

Terminate (Fields)

Terminate (Form)

Globals Terminate

[optional] Script Library Terminate

Composing a new document

[optional] Script Library Initialize

Globals Initialize

Initialize

JS Header

QueryOpen

Initialize (Fields)

PostOpen

onLoad

Deleting a document in a view

QueryDocumentDelete (Database Script event)

PostDocumentDelete (Database Script event)

Editing an existing document

QueryOpenDocument (View)

[optional] Script Library Initialize (Form)

Globals Initialize

Initialize (Form)

JS Header

QueryOpen

Initialize (Fields)

PostOpen

onLoad

Entering a field

Entering

onFocus

Exiting a field

onBlur

Exiting

onChange

Leaving a view

QueryClose

Terminate

Globals Terminate

[optional] Script Library Terminate

Opening a database to a view

[optional] Script Library Initialize (View)

Globals Initialize (View)

Initialize (View)

QueryOpen (View)

PostOpen (View)

[optional] Script Library Initialize (Database)

Initialize (Database)

PostOpen (Database)

Opening a database

[optional] Script Library Initialize

Initialize

PostOpen

Opening a view

[optional] Script Library Initialize

Globals Initialize

Initialize

QueryOpen

PostOpen

Refreshing a document

Postrecalc (Form)

Refreshing a view

QueryRecalc

Running an agent

[optional] Script Library Initialize

Initialize

Terminate

[optional] Script Library Terminate

Saving a document

QuerySave (Form)

onSubmit

PostSave

Undeleting a document in a view

QueryDocumentUndelete (Database Script event)