i am using this code it is show doclink but it is not opening it show some error.
var document1:NotesDocument = database.createDocument();
var rtitem:NotesRichTextItem = document1.createRichTextItem("body");
document1.replaceItemValue("Form", "memo");
document1.replaceItemValue("SendTo", "[email protected]");
document1.replaceItemValue("Subject", "Rajesh");
rtitem.appendText("Some text here... ");
rtitem.addNewLine(2);
rtitem.appendText("NotesDocument.NotesURL");
rtitem.appendDocLink(document1, "Some comment text");
rtitem.addNewLine(2);
document1.save();
document1.send();
Error:-
Please tell me how to open a doclink.
I guess you want to create a link to XPage's current document in your email.
You might have a data source defined in your XPage which is named "document1" as default
Then, your code would look like this:
I changed email document's object name to
documentMail
and added.getDocument()
.document1.getDocument()
gives the data sources' document.