AddressBooks (NotesSession - JavaScript)

Read-only. The Domino® Directories and Personal Address Books, including directory catalogs, known to the current session.

Defined in

NotesSession

Syntax

getAddressBooks() : java.util.Vector

Usage

The elements of the return value are of type NotesDatabase.
A database retrieved through getAddressBooks is closed. To access all its properties and methods, you must open the database with the open method in NotesDatabase. Only the following properties are available when the database is closed:
  • getFileName
  • getFilePath
  • isOpen
  • isPublicAddressBook
  • isPrivateAddressBook
  • getParent
  • getServer
If the program runs on a workstation, both Domino® Directories and Personal Address Books are included. If the program runs on a server or through remote (IIOP) calls, only Domino® Directories on the server are included.

Examples

This button gets the server and database names of the address books for the current session.
var books = session.getAddressBooks().iterator();
requestScope.status = "Address books for current session";
while (books.hasNext()) {
	var db:NotesDatabase = books.next();
	var dbname = db.getFileName();
	var sname = db.getServer();
	if (sname == "") {
		sname = "Local";
	}
	requestScope.status += "\n" + sname + " " + dbname;
}