HasEmbedded (NotesDocument - JavaScript)

Read-only. Indicates whether a document contains one or more embedded objects, object links, or file attachments.

Defined in

NotesDocument

Syntax

hasEmbedded() : boolean
Legal value Description
true if the document contains one or more embedded objects, object links, or file attachments.
false if the document does not contain any embedded objects, object links, or file attachments.

Examples

This computed field displays the names of embedded objects in the document.
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasEmbedded()) {
	var eos:java.util.Vector = doc.getEmbeddedObjects();
	if (eos.isEmpty()) {
		return "Contains attachments"
	} else {
		var msg:string = "Contains embedded objects:";
		var eosi:java.util.Iterator = eos.iterator();
		while (eosi.hasNext()) {
			var eo:NotesEmbeddedObject = eosi.next();
			if (msg.endsWith(":")) {
				msg = msg + " ";
			} else {
				msg = msg + "; ";
			}
			msg = msg + eo.getName();
		}
		return msg;
	}
} else {
	return "No embedded documents"
}