Tiny Lotusscript tip (I know!)

Well, bless my soul, you live and learn. Tonight I sat down to fix one remaining issue on a Lotus Notes client app I’ve been a-tweakin’. It was a head-scratcher, because I wanted to open a help document from another database using a “Help” button in a dialogue box. For reasons too tireseome to go into, I couldn’t use the nice simple @Command([OpenHelpDocument]) so had to rely on a wee bit of custom Lotusscript. Now, it’s been some time since I did anything with Lotusscript’s UI classes, and I really can’t say I’ve missed ’em:

Dim ws As New NotesUIWorkspace
Call ws.EditDocument(False, doc, True, "")

… results in:

Notes Error - This operation is not allowed while a dialog box is displayed.

Bah, of course. This rings a vague bell. So, in a pouty fit of pique I did this:

Dim ws As New NotesUIWorkspace
Call ws.DialogBox("Some form", blah blah blah …

…and what do you know, it worked (even if the form you use for the dialog box isn’t in the database in which you’re working). So I’m still learning! To summarise: you can’t use NotesUIWorkspace.EditDocument from a dialogbox, but you can use NotesUIWorkspace.DialogBox. Of course :-)

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.