uiDoc.refresh in QueryClose

I want to refresh embedded view in my form. I do this with uiDoc.refresh in QueryClose event. But it works only sometimes. It seems as the form was closed earlier than the refresh is finished.

Any solution? Thanks

Subject: uiDoc.refresh in QueryClose

The uidoc.refresh won’t refresh the views inside a document. From what I’ve observed the views, although embedded in the document, don’t respond to uidoc commands. Try getting a handle to the view in one of the form events such as set view = db.getview(“viewname”)and then perform

view.refresh. Since you are doing this in the close it will be refreshed when they reopen it.

Subject: You seem to be mistaken

NotesView.refresh is background solution and thats why it is bad - the changes in the view are not display immediately.

UiDoc.refresh refresh documents in embedded view, I think it is the same as F9. It works fine e.g. in a button, but in QueryClose, there is problem I have described before.