views:

136

answers:

3

Hi,

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

+1  A: 

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).

Ed Schembor
Thanx Ed.But in my Nsf Sample i am getting "" value of RouteTimes and RouteServers for both Notes and mail.
Preeti Singh
+1  A: 

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.

JoeBilly
A: 

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)

belisarius