Event Handling |
Understanding Model-Events
When the Document.Save method is called, the following is the sequence in which events will be fired. Developers can override these methods to bring about the desired effect in the individual documents they create. To override the methods, developers have to write the code in the model-event editor for the appropriate method by choosing the table/document and event-type in the list-boxes.
if there are no instances with the same key values (key of master table) as in present document Document.PreInsert() Document.MasterTable.PreInsert() Document.MasterTable.PostInsert() Document.detailtable(i).PreInsert() Document.detailtable(i).PostInsert() Document.PostInsert() else if there are a modification ( a row is inserted, a row is deleted, a row updated in a detail-table) Document.PreUpdate() if a row is inserted in a detail table table.PreInsert() table.PostInsert() if a row is updated in a detail table table.PreUpdate() table.PostUpdate() if a row is deleted in a detail table table.PreDelete() table.PostDelete() if the instance of the document is deleted Document.PreDelete() Document.MasterTable.PreDelete() Document.MasterTable.PostDelete() Document.detailtable(i).PreDelete() Document.detailtable(i).PostDelete() Document.PostDelete()