StdObjectDelete event
Occurs before Windows client deletes the current object in a collection or subcollection during execution of any of these situations:
- The default implementation of the StdFormDelete event
- An event handler of the type Collection Delete
- The Delete method in a script
The default implementation handles new objects (that is, objects that have not been saved to a SQL Server table) and saved objects differently. WinStudio removes a new object from the collection immediately but marks a saved object as deleted. The marked object will be deleted from the database table when a Save operation is performed.
The default implementation generates these sequences of standard events:
For saved objects:
- StdObjectDelete
- StdObjectDeleteExisting
- StdObjectDeleteExistingCompleted
- StdObjectDeleteCompleted
For new objects:
- StdObjectDelete
- StdObjectDeleteNew
- StdObjectSelectCurrent
- StdObjectSelectCurrentCompleted
- StdObjectDeleteNewCompleted
- StdObjectDeleteCompleted
Your application cannot call the default implementation by generating the event.
Remarks
The default implementation is a collection-level operation, which can occur in a collection whether or not the collection is current.
If the default implementation is performed on an object that has been marked as deleted, Windows client removes the mark and the object will not be deleted when a Save operation is performed.
A StdObjectDeleteExisting or a StdObjectDeleteNew event is fired before each deletion.