Question

I have a form in which I have embedded a view. Now from that embedded view I need to open the document in a dialog box. So I created a new form specific for that dialog box and in the QueryOpenDocument added

@DialogBox("mdro";[AutoHorzFit]:[AutoVertFit]:[OkCancelAtBottom]:[SizeToTable];"My Data")

Now, this is opening up a blank dialog box.

Was it helpful?

Solution

You will not be able to solve this using Formula, as the Context of your "Action" most probably will NOT be the selected document from the view.

QueryOpenDocument is the right place to go, but you have to code this in LotusScript:

Dim doc as NotesDocument
Dim ws as New NotesUIWorkspace

Set doc = Source.Documents.GetFirstDocument()
If not doc is Nothing then
  Call ws.Dialogbox("mdro", True, True, True, False, False, False, "My Data ", doc, True, True, True)
End If

'Set Continue to false to prohibit opening of the document
Continue = False

Take care: Somewhere in your code you have to save the document (using doc.Save(True, True, True), otherwise the changes will not be visible....

OTHER TIPS

Put your formula into the Action on Action bar of your embedded view. In this case you will have proper context and could successfully open document from your view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top