Archive for the ‘Development’ Category

Frame design Best Practices Part II

Monday, June 9th, 2008

Extending on my previous article on Frame design Best Practices I have found something else worth mentioning that is not written in any designer help.

When trying to open the preview pane within a 3rd party application today I got presented with an error message: “Cannot execute the specified command.” (more…)

Author access creates $KeepPrivate field for new documents

Tuesday, March 25th, 2008

Nowadays it seems to be public known, that the existence of a $KeepPrivate field prevents documents from being copied, forwarded or printed in Lotus Notes. Until recent I was aware of about three possibilities on how this field will be added to a document. Via design specifications, manually via smart icon code or while using the ‘Prevent copying’ delivery option in the Notes client.

While testing an application for compatibility against Notes/Domino 7.0.3 recently an user complaint that she would not be able to copy documents from one field to another using the clipboard. This was caused by the existence of the $KeepPrivate field for each newly created document.  According to the IBM Support this appears to be a feature even I wouldn’t totally consider it as such. If an user has the access rights to create new documents within a database as author or above but did not the replicate or copy documents option granted, each document created from this (group of) user(s) will have a $KeepPrivate field set to 1.

Looks like I need to log a new PMR to find out whether or not there are plans to address this in any future release to split up the replication and the copy right.

Doclink does not open with LS created Doclink

Friday, September 14th, 2007

Today I had an interesting issue I definitely need to put out here to be able to remember it in the future.

I used a piece of code (see below) to append a link to a document, sent out via an email message to another user. When the recipient opened that message and clicked the doclink a dialogue box came up “The Doclink database cannot be located.” asking the user to select the server where the linked database is located. This issue however did only happen in some circumstances. (more…)

Alternative design patterns for sections

Saturday, July 21st, 2007

Sections in Lotus Notes applications are primarily used to organise documents containing a lot of information where multiple design elements or paragraphs are collapsed into a single line. For this purpose IBM provided us with a basic set of formats.

Lotus Sections
These formats however do not always fit the style of a modern application. But fortunately there are alternative ways. Take a look to the pictures below showing a collapsed and an expanded section in one of my recent applications.

Collapsed Section

Expanded Section

It should be easy to guess that the expanding and collapsing is done in clicking the plus/minus signs with the mouse. But how does that work and how does the background code look like? (more…)

Prevent documents from being pasted into an application

Monday, July 16th, 2007

Today I remembered an workaround in Lotusscript I used in the past to prevent documents from being pasted into an application. The key is an Agent set to be triggered ‘When documents are pasted’.

The code of the Agent looks like this (for the ease of reading no error handling has been included):

Sub Initialize
Dim session As NotesSession
Dim db As NotesDatabase
Dim colPasted As NotesDocumentCollection
Dim doc As NotesDocument
Dim docRemove As NotesDocument
Set session = New NotesSession
Set db = session.CurrentDatabase
Set colPasted = db.UnprocessedDocuments
Set doc = colPasted.GetFirstDocument
Do While Not doc Is Nothing
Set docRemove = doc
Set doc = colPasted.GetNextDocument(doc)
Call docRemove.RemovePermanently (True)
Loop
Msgbox "You are not authorised to paste documents into this application.",16,"Error"
End Sub

The key in this solution is the usage of two NotesDocument objects, doc holding the current document to work on and docRemove containing the actual document to be removed. If doc would have been remove prior to using the GetNextDocument method of the collection, the collection would be unable to identify the next document.

I believe that there are other solutions out there. One possible option would be to immediately flag the pasted document to not show up in any view any more and to delete via a background maintenance agent. It would be interesting to hear how others are preventing documents from being pasted.


Creative Commons Attribution-NonCommercial 3.0 Unported
This work by cubetoon is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported.