getDocumentByID (NotesDatabase - JavaScript™)

データベースで、指定された文書 ID の文書を検索します。

定義場所

NotesDatabase

構文

getDocumentByID(noteid:string) : NotesDocument
パラメータ 説明
noteid 文書の文書 ID。
戻り値 説明
NotesDocument 文書 ID がパラメータと一致する文書。

使用法

文書 ID についての説明は、NotesDocument の NoteID プロパティを参照してください。

@NoteID から文書 ID を取得する場合は、「NT」接頭辞を削除してください。

文書 ID が無効の場合は、例外が発生します。

以下のボタンは、指定された文書 ID の文書を取得します。
try {
	var noteid:string = requestScope.query;
	if (noteid.startsWith("NT")) { // in case it comes from @NoteID 
		noteid = noteid.substring(3);
	}
	var doc:NotesDocument = database.getDocumentByID(noteid);
	requestScope.status = doc.getItemValueString("subject");
} catch(e) {
	requestScope.status = "Invalid note ID";
}

言語間の参照

LotusScript® NotesDatabase クラスの getDocumentByID メソッド

Java Database クラスの getDocumentByID メソッド