removeAllAttachments (NotesXspDocument - JavaScript)

文書アイテムから添付ファイルをすべて削除します。

構文

removeAllAttachments(fieldName:string) : void
パラメータ 説明
fieldName 添付ファイルを格納するアイテムの名前。

使用法

この操作の実行結果をデータストア内に反映するには、save (NotesXspDocument - JavaScript) メソッドを使用して文書を保存する必要があります。

以下のボタン onclick イベントは、body アイテムからすべての添付ファイル (存在する場合) を削除します。
if (document1.getAttachmentList("body").isEmpty()) {
	requestScope.alist = "No attachments in body";
} else {
	document1.removeAllAttachments("body");
	requestScope.alist = "All attachments removed from body";
}