getPrevSibling (NotesMIMEEntity - JavaScript)

Returns the MIME entity immediately preceding the current MIME entity at the same level within a multipart MIME entity.

Defined in

NotesMIMEEntity

Syntax

getPrevSibling() : NotesMIMEEntity
Return value Description
NotesMIMEEntity The previous sibling MIME entity or null.

Examples

This button gets all the children at the end of the last branch of a multipart entity by searching breadth first.
// Do not automatically convert MIME to rich text
session.setConvertMIME(false);
var mime:NotesMIMEEntity = currentDocument.getDocument().getMIMEEntity();
if (mime != null) {
	// Drill down to last child at bottom of first branch
	var child:NotesMIMEEntity = mime.getNextEntity(NotesMIMEEntity.SEARCH_BREADTH);
	while (child != null) {
		mime = child;
		child = mime.getNextEntity(NotesMIMEEntity.SEARCH_BREADTH);
	}
	// Get content of all children at bottom level
	// of first branch in reverse order
	while (mime != null) {
		requestScope.status += mime.getContentAsText() + "\n";
		mime = mime.getPrevSibling();
	}
} else {
	requestScope.status = "Not MIME";
}
// Restore conversion
session.setConvertMIME(true);