How to distinguish between "Note" and "Mail" in Lotus notes? Using Domino.dll

I have an Nsf file in which in one of the folders there are some items of mail and notes.

I distinguish each element with the "form" property. In the case of the mail form type, this is a “memo”, but in the above scenario Notes Type “form” is again a “note”

How can I differentiate these two elements?

thanks

+4
source share
3 answers

Using the "form" element is not a safe way to distinguish emails from other "documents." In fact, the Notes datastore does not distinguish where the document came from - from the sent message or the created document. However, you can use the RouteTimes and RouteServers fields to get a pretty good idea of ​​whether this document was triggered from an email message. (The existence of any field usually means that the document was delivered by the mail router).

+1
source

If you want to compare fields, I think the best way is to compare $ fields, because they are usually reserved for internal use and should not be updated for no good reason. Therefore, they are the most accurate form fields.

Check out $MessageID , $MIMETrack or $UpdatedBy . This last one should be used with caution, but it should contain the mail server (s), if it is mail.

+1
source

In LN, you can make fun of the letter template in a note. Thus, there is no reliable way to distinguish a note from mail IF you know how notes were created and use this information to create a test based on specific conditions. If you can control the creation of notes, I suggest using a specific form to be able to distinguish between each type of recording.

Of course, you can check the properties (fields and values) of your notes and build the test “heuristically” (which means the rule of thumb)

0
source

Source: https://habr.com/ru/post/1310225/


All Articles