Not sure what I'm doing wrong, but here is the code
1: var currDoc:NotesDocument = currentDocument;
2: var doc:NotesDocument = database.createDocument();
3: doc.replaceItemValue("form", "Memo");
4: doc.replaceItemValue("sendTo", currDoc.getItemValueString("responsible"));
5: doc.replaceItemValue("subject", currDoc.getItemValueString("replySubject"));
6: var rtitem:NotesRichTextItem = doc.createRichTextItem("Body");
7: rtitem.appendText("The following more information request has been answered:");
8: rtitem.addNewLine(2);
9: rtitem.appendText("Subject: " + currDoc.getItemValueString("replySubject"));
10: rtitem.addNewLine(2);
11: rtitem.appendText("Reply Text: " + currDoc.getItemValueString("replyText"));
12: rtitem.addNewLine(2);
13: rtitem.appendDocLink(currDoc);
14: doc.send();
Problem on line 13 (what are the chances of that) Error while executing JavaScript action expression Script interpreter error, line=13, col=8: [TypeError] Method NotesRichTextItem.appendDocLink(NotesXspDocument) not found, or illegal parameters, when I comment out line 13 the rest of the code works fine, sends the email with the content from the document I am trying to pass to the email.