How to update a document in embedded view using Dialog Box?

I have a form with an embedded view with show single category. What I want is when I double click a document in the embedded, it will displayed in a dialogbox. Is there a way to do this? thanks

Subject: How to update a document in embedded view using Dialog Box?

In the view queryopen event, get the doc and open it in a dialog box, then set continue to false

dim doccol as notesdocumentcollection

set doccol = source.documents

dim doc as notesdocument

set doc = doccol.getfirstdocument

dim w as new notesuiworkspace

call w.dialogbox(doc.form(0), …)

continue = false

Subject: RE: How to update a document in embedded view using Dialog Box?

thanks for the reply. However if I edit the field in the dialogbox it is not reflected in the document in the embedded view even though the [NoNewFields] and [NoFieldUpdate] is set to False.

Any workaround on this? tks

Subject: RE: How to update a document in embedded view using Dialog Box?

Have you saved the document?

Unless you want to do something with the doc after the prompt you don’t need to set those flags to false.

If all you’re trying to do is edit the document and save it, I just put the following in the queryclose of the dialog form:

Dim canc As Variant

canc = source.DialogBoxCanceled

If source.editmode Then

	If canc = False Then

		Call source.Save

	End If

End If

…which saves the doc if it’s in edit mode and hasn’t been cancelled

Dan

Subject: RE: How to update a document in embedded view using Dialog Box?

thanks a lot, it works. another problem, how can I also update the underlying document? the one open in UI, not in the embedded view. I want the changes made in the document in the embedded view be recorded in the document open in UI. thanks