Database Script -> QueryClose doesn't fire when closing applications in the client

The queryclose event doesn’t seem to get triggered when an application is closed.

It seems related to having the application open in Domino Designer. When I close Domino Dedigner, the queryclose event of the last application i had open in the client got fired.

I tested/reproduced this in two existing applications, and a new test-application.

If you only have the application open in the Client, events works as they should.

Subject: QueryClose Problem

Have you seen this?

http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/queryclose-annoyances

Does this explain the problems you are having?

I’m not sure how you would implement the workaround of $HasAbortQueryClose at Database level, but if your database uses an outline, you could put the outline on a form, adding the field on the form. Worst case scenario, you can make the form Public Access with SaveOptions field set to “0”.

Subject: Confirming NotesUIDatabase.QueryClose problem

I can confirm Tommy’s description of the problem whereas I cannot confirm the other problem being related to a NotesDocument:

I entered a plain MsgBox in the Queryclose events of both a Notes form and a Database Script. My 8.5 Gold Designer client is set to cache all listed databases at start time.

  1. closing the database / application in the standard client and with Designer open (there’s no element of my database currently open in Designer!) the NotesUIDatabase.QueryClose is NOT TRIGGERED. If however I shut down Designer afterwards then the event is triggered, the MsgBox is displayed! And if I close my opened database where Designer is NOT started the event is correctly triggered and MsgBox displays as expected

  2. In contrast to that my NotesUIDocument.QueryClose event is triggered no matter if I close my Notes Doc from read or edit mode, “clean” or “dirty”. So I don’t know what to think of that; maybe, since André’s blog entry (http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/queryclose-annoyances) is dated early November 2008, so maybe (hopefully) Lotus somehow did get a fix in… (phew!)

Subject: Database QueryClose

Nope… The bug is not in the QueryClose of a document/form, but in QueryClose of an application/database.

Subject: Same Problem on Postopen

Nice tip, i got the same Problem on the Database Postopen event. If i close my designer the code worked. As long as the designer was opened nothing happends on the client.