7 Replies Latest reply on Jun 27, 2016 10:31 AM by mdiehr

    WebDirect uncommitted record behavior upon exit


      I have a WebDirect system where a new record is created on a layout:


      • The layout has a script event set for OnRecordCommit to block the default behavior of committing when a user exits a field or clicks outside a field.
      • The layout has only two buttons available:  Save and Cancel. 
      • Save Record Changes Automatically is Enabled


      The Save button runs a script that checks the records for errors and Commits the record if OK, so a new record is created.

      The Cancel button Reverts the record (which, since the record was never Committed, makes the record disappear).


      This works great in general.  However I've seen a few bogus records be entered where the data is invalid and should never have been committed.


      After some testing, I've discovered what happens:

      1. If the user hits Browser Reload, the uncommitted data is properly discarded.  (Good!)
      2. If the user simply closes the web browser, the uncommitted data is committed. (Bad!)


      I have not yet tested what happens if the user simply sits there and the system times out.


      I'm interested in some way of ensuring that #2 never happens : if a user does not exit the layout (or WebDirect itself) cleanly, I don't want the record committed ever.