'uQueryCanDeactivate' in EPC831 can be used to check unsaved changes when running VLF applications

Date: 6 February 2009
Product/Release: Visual LANSA Framework EPC831
Abstract: Methods in command handlers to check unsaved changes when running VLF applications
Submitted By: LANSA Technical Support

A new feature called 'uQueryCanDeactivate' has been released in EPC831 of the Visual LANSA Framework.

This is a method you can define in a command handler to:

  1. Check whether there are unsaved changes.
  2. Asks end users if they wants to save their unsaved changes.
  3. Save unsaved changes.

This method is executed when a user clicks on a different command handler, a different instance of a business object, a different business object or application, or even when the user closes the Framework.

It is useful for saving unsaved changes as the routine can check whether changes need to be saved. If so, the user can asked "Do you want to save your changes before continuing?" (Yes/No). If the answer is Yes, their changes can be saved.

At the time when the routine is executing, the command handler still has all its values as they were before the user attempted to move away. Therefore checking for unsaved changes, and saving those changes, is easy.

To use it, you need to set the avNotifyDeActivation property in the command handler and add a redefined QueryCanDeActivate routine to your command handler.

For more details of how to use this facility, download the document Saving unsaved changes using uQueryCanDeactivate.doc