Himanshu.MarJAVA
Himanshu.MarJAVA

Reputation: 525

Opening a document in dialog box from an embedded view opening blank

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.

Upvotes: 0

Views: 3013

Answers (2)

pstr
pstr

Reputation: 384

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.

Upvotes: 1

Tode
Tode

Reputation: 12060

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....

Upvotes: 5

Related Questions