NotesUIDocument.Refresh causes client Crash

I have an embbeded view in a form, in the view’s QueryOpenDocument event I call the ‘Refresh’ method of NotesUIDocument class:

MyUIDocument.Refresh

Always that this line is executed the Notes client crash. I know there are a lot of people who have the same problem, I would like to know if somebody have a solution for this bug.

(Please don’t tell me that erase that line because I have a complete list of reasons to don’t do that)

Thanks in advance,

Sergio

Subject: NotesUIDocument.Refresh causes client Crash

Why are you calling a NotesUIdocument.refresh in the QueryOpenDocument event of an embedded view. It just does not make any sense:

What UI are you trying to refresh? the UI of the document containing the embedded view? How do you think you can pull this off if there is no focus on that document but the focus is on the view?

Are you trying to refresh the document being opened and if sdo, how can you do a uidoc.refresh of a document that is not yet open in the UI?

Subject: RE: NotesUIDocument.Refresh causes client Crash

Let me explain a little bit better why I’m calling refresh method.

There is a Form where are two embbeded views, one view contains a generic list of customers and the other view contains only customers selected by the user, how it works?

Well, the user double-click over a customer in the generic list of customers and then that customer is copied to the content of the other view.

When the customer is clicked in the generic list, the view’s event ‘QueryOpenDocument’ is trigered.

That event has LS code to copy the document to the second view (the default behavior, open document, is ignored), but the second view contents doesn’t refresh automatically, so I have to call NotesUIDocument.Refresh.

Now, about your last question:

  • The ‘Refresh’ method works over entire UIDocument, including embbeded views on it.

Sergio