Bug with encrypted documents and LotusScript NotesDocument.isEncrypted property - what do you think?
Julian Buss, July 23rd, 2010 09:21:42
Tags:  Development 
I found something by accident: let a collegue send you an encrypted mail.
Then write a LotusScript agent like this:

---
Dim session As New NotesSession
MessageBox "Selected document is encrypted: "+CStr(session.currentDatabase.Unprocesseddocuments.Getfirstdocument().isEncrypted)
---

Now perform the following two tests:

1.) Select the encrypted mail in the inbox and execute the agent. You will see that the .isEncrypted property is FALSE.

2.) Open the mail, then execute the agent against the open UIDocument. You will see that the .isEncrypted property is TRUE (as it should be).

From my point of view, this means:

- As soon as you access an ecrypted document with LotusScript and you got the handle to the document from a view, the document will be decrypted. If you save the document then, it will be saved DECRYPTED. You need to call .encrypt() by yourself again.

- You cannot test if a document is encrypted or not at all if you got the handle to the document from a view.

- The behaviour is different wether you got the document from the view or an open UIDocument.

I tested this with 8.5.1 and 8.5.2CD5. Can anyone confirm this with other clients? What do you think about this?
About this site
I am a Lotus Notes developer, consultant and one of the founders of YouAtNotes, a german software vendor specialized in Lotus Notes software for CRM, Workflow and Web solutions.
I write about IBM Lotus software and other stuff which I come across. Have a nice time here!

Search
RSS-Feeds
rssfeed.pngContent Feed
rssfeed.pngComment Feed
Recent posts
Recent comments
Links to YouAtNotes
Links to YouAtNotes (in german)
Archive
Impressum / Datenschutz
(german)