I have noticed lately that the functionality of the NotesDocument.IsValid has changed.
I have an application where I loop over response documents, looking for ones that belong to the current user.
Each response document is secured using a READERS field.
When a user runs the code, doc.Responses contains all responses regardless of whether the user actually has access to the documents.
Inside the response loop, I check NotesDocument.IsValid to determine whether the user has access to the document. This used to work fine, but now IsValid works more like it is documented to work. That is, it only identifies whether the document is a deletion stub or not.
This is unfortunate for me since I now have to remember everywhere I have ever used IsValid to check for document access. And find a workaround. Currently, I am checking NotesDocument.Size, and if it’s zero, I know that the document should be skipped. There really should be a supported method for determining whether the current (or any) user has access to a document. Something like IsReader([user_name]) or IsAuthor([user_name]) would be great!
It is also very confusing having two methods that appear identical in the documentation except for a minor difference in verbiage…
NotesDocument.IsValid
Indicates whether a Document object represents an existing document (not a deletion stub) initially.
NotesDocument.IsDeleted
Indicates whether a Document object represents an existing document (not a deletion stub) on an ongoing basis.
What the heck! Either a document is deleted or it isn’t. What’s this “initially” vs “on an ongoing basis” junk?
Anyway, enough of my rantings.
Any thoughts on this? At the very least, I would have expected a note in the documentation listing the change in behavior.