Search code examples
emaillotus-notesmessageid

Get message id (not universal id) from Notes document


I want to fetch message id of the document. I tried

document.getItemValueString("$MessageID");

but it's giving null.


Solution

  • Check out this thread from the Notes forum. You may need to follow the advice there, which is to set the saveMessageOnSend property to true before sending and then obtain the $MessageID from the copy of the document that is saved back to the mail database.

    http://www-10.lotus.com/ldd/nd6forum.nsf/78d8a01e181f9b73852569fa0078668a/f08a0ebfc65537b185257b4300097939?OpenDocument

    Otherwise, you may need to add a tilde before the dollar sign:

    document.getItemValueString("~$MessageID");