开发者

How to differentiate "Note" and "Mail" item in Lotus notes? Using Domino.dll

开发者 https://www.devze.com 2022-12-30 16:02 出处:网络
I have a Nsf file in which in one of folder there are some mail and notes items. I am differentiating开发者_开发技巧 each item with \"form\" property.

I have a Nsf file in which in one of folder there are some mail and notes items.

I am differentiating开发者_开发技巧 each item with "form" property. In case of mails form type is "memo" but in above scenario Notes "form" type is again "memo"

How can i differentiate these two items?

thanx


Using the "form" item is not a safe way to distinguish emails from other "documents". In fact, a Notes data store does not really distinguish where a document came from - whether from a delivered email or a created document. However, you can use the fields RouteTimes and RouteServers to take a pretty good guess as to whether a given document was initiated from an email message. (The existence of either field will generally mean the document was delivered by the mail router).


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

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


In LN you can mock a the mail template in a note. So there is no sure way to distinguish a note from a mail UNLESS you know how the notes were created and use that info to build a test based on specific conditions. If you can control the note creation, I suggest to use a specific form to be able to distinguish each record type.

Of course you can check the properties (fields and values) of your notes and build a test "heuristically" (meaning rule-of-thumb)

0

精彩评论

暂无评论...
验证码 换一张
取 消