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

Hi, In my notes application, I have a popup window with a subform in it. In the subform, I have a field which data as a key, beside the key, I have a button, I want to open a document in read mode based on this key by using this:

,

Set doc3 = RppView.getdocumentbykey(uidoc.document.KeyNo(0),True)

Set uidoc = workspace.EditDocument( False, doc3 )

###############

But I got error message:

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

Does anybody know how to make it work? Thanks

Subject: need to fool Notes

You can’t open another document while you’re in a dialog box, but you can close that document and open another.

What you need to do is pass the key back to the code that opened the dialogbox, then find and open the relevant document with a new NotesUIWorkspace.dialogbox call. You can certainly open this in read mode with the various options available in the dialogbox call.

Hope this helps,

Phil