Tuesday 19 August 2008
An Interesting use of the postopen event of the application
I was faced with an interesting programming issue today which was solved with the seldom used PostOpen event that you can find on the database (sorry application). You can find this in the Other section of the application, then the Database Resources and then Database Script .
The event is found inside this section and gets triggered immediately the Application has reached a restful state in the UIworkspace.
This is an event that in our Org is seldom used, so seldom I thought I would blog the fact we used it. Basically we needed a check when the application opened that if it was a local replica that it had been replicated within a certain "window" of opportunity. If the file had not been replicated in say the last 14 days the application would close until the user replicated. If the file had not been replicated in the last 90 days then the file was "locked" and could never be used and the user was prompted to recreate the replica.
As I say this and the other events in the DB script section are often overlooked and when you really need them they can be really useful!
** Update ** Quite a few people have come up with MUCH more interesting uses, I advice you to have a read at the comments.