openDatabaseByReplicaID (NotesDbDirectory - JavaScript)

Opens the database with a specified replica ID.

Defined in

NotesDbDirectory

Syntax

openDatabaseByReplicaID(rid:string) : NotesDatabase
Parameter Description
rid The replica ID of the database that you want to open.
Return value Description
NotesDatabase The opened database. An exception occurs if the database cannot be opened.

Examples

This button opens a local database using a replica ID from elsewhere on the page.
var dir:NotesDbDirectory = session.getDbDirectory(null);
var rid:string = sessionScope.rid;
try {
	var db:NotesDatabase = dir.openDatabaseByReplicaID(rid);
} catch(e) {
	requestScope.status = "Cannot open database with replica ID " + rid;
	return;
}
requestScope.status = "Opened database " + db.getFileName();