getDocumentByID (Database - Java)

Finds a document in a database, given the document note ID.

Defined in

Database

Syntax

public Document getDocumentByID(String noteid)
    throws NotesException

Parameters

String noteid

The note ID of a document.

Important: The note ID is 8-character length, do not use UNID (32 character length here), otherwise, the method will try to search using last 8 character of UNID and return wrong document. Use getDocumentByUNID if you find document using UNID.

Return value

Document

The document whose note ID matches the parameter.

Usage

If you get a note ID from @NoteID, delete the "NT" prefix.

Example