Need help refreshing a document after editing an entry from it's embedded view

Does anybody has a way that programmatically gets the focus back on the document that contains the embedded view after editing an entry from it’s embedded view?

The only way I could do it is with calling an agent after I had saved and closed the document contained by the embedded view.

But I needed a messagebox to get the focus out of the embedded view;

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Messagebox “Update current document”,64,“Update document”

Set uidoc = ws.CurrentDocument

Call uidoc.Refresh 'needed to recalc computed fields that contain data from the embedded view’s documents

Without the messagebox line this code won’t work as the focus remains on the last opened entry in the embedded view.

Any solutions without using a dummy messagebox that annoys users would be very welcome.

Subject: Need help refreshing a document after editing an entry from it’s embedded view

I don’t know if this helps in your case, but one way I got round it was to call a uidoc.close on the queryopendocument of the embedded view. This then closes the parent document. Then on the close of the embedded document, write code to update the parent doc in the backend and re-open it.

Don’t think there’s any way you can do it in the ui (although may be wrong of course).

Dan

Subject: RE: Need help refreshing a document after editing an entry from it’s embedded view

Thanks Dan, that would be a way to do it however in my case closing and re-open the parentdoc would heavily interfere with work-flow and already opened Word attachments.

Don’t think there’s any way you can do it in the ui

Indeed, I’m afraid there isn’t, strange though because simply hitting the key will do the trick but I have tried all sorts of (sequenced) @Commands without result. :frowning: