getPrevEntity (NotesMIMEEntity - JavaScript™)
Returns the MIME entity immediately preceding the current MIME entity within a multipart entity.
Defined in
NotesMIMEEntitySyntax
getPrevEntity() : NotesMIMEEntity
getPrevEntity(search:int) : NotesMIMEEntity
Parameter | Description |
---|---|
search |
|
Return value | Description |
---|---|
NotesMIMEEntity | The previous MIME entity, or null. |
Examples
This button gets all the entities from the end of the last branch of a multipart entity in reverse order.// 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.getPrevEntity(NotesMIMEEntity.SEARCH_BREADTH);
}
} else {
requestScope.status = "Not MIME";
}
// Restore conversion
session.setConvertMIME(true);