Using Business Object Hook Methods
Business object hook methods provide a place where you can insert code to be executed before and after important business object events.
The hook methods described in this topic provide a way for you to hook into events in the current business object as well as the parent business object.
Business Object Hook Methods
HookPreCancelEntity
Hook method in which developers can place code to be executed before changes are canceled. If this method returns false, the cancel is aborted.
protected internal virtual bool HookPreCancelEntity(EntityType entity)
HookPostCancelEntity
Hook method in which developers can place code to be executed after changes to the entity are canceled
protected internal virtual void HookPostCancelEntity(EntityType entity)
HookPreCancelEntityList
Hook method in which developers can place code to be executed before changes to the entity list are canceled. If this method returns false, the Cancel is aborted
protected internal virtual bool HookPreCancelEntityList(mmBindingList<EntityType> entityList)
HookPostCancelEntityList
Hook method in which developers can place code to be executed before changes to the entity list are canceled. If this method returns false, the Cancel is aborted
protected internal virtual void HookPostCancelEntityList(mmBindingList<EntityType> entityList)
HookPreDeleteEntity
Hook method in which developers can place code to be executed before the entity is deleted. If this method returns false, the Delete is aborted
protected internal virtual bool HookPreDeleteEntity(EntityType entity)
HookPostDeleteEntity
Hook method in which developers can place code to be executed after the entity is deleted
protected internal virtual void HookPostDeleteEntity()
HookPreDeleteEntityList
Hook method in which developers can place code to be executed before all entities in the list are deleted. If this method returns false, the Delete is aborted
protected internal virtual bool HookPreDeleteEntityList(mmBindingList<EntityType> entityList)
HookPostDeleteEntityList
Hook method in which developers can place code to be executed after the entity list is deleted
protected internal virtual void HookPostDeleteEntityList()
HookPreGetEntity
Hook method in which developers can place code to be executed before the entity is retrieved. If this method returns false, the Retrieve is aborted
protected internal virtual bool HookPreGetEntity(EntityType entity)
HookPostGetEntity
Hook method in which developers can place code to be executed after data is retrieved.
protected internal virtual void HookPostGetEntity(EntityType entity)
HookPreGetEntityList
Hook method in which developers can place code to be executed before the entity list is retrieved. If this method returns false, the Retrieve is aborted
protected internal virtual bool HookPreGetEntityList(mmBindingList<EntityType> entityList)
HookPostGetEntityList
Hook method in which developers can place code to be executed after the entity list has been retrieved
protected internal virtual void HookPostGetEntityList(mmBindingList<EntityType> entityList)
HookPreNewEntity
Hook method in which developers can place code to be executed before the entity is created. If this method returns false, the creation is aborted
protected internal virtual bool HookPreNewEntity()
HookPostNewEntity
Hook method in which developers can place code to be executed after the entity has been created
protected internal virtual void HookPostNewEntity(EntityType entity)
HookPreSaveEntity
Hook method in which developers can place code to be executed before the entity is saved. If this method returns false, the save is aborted
protected virtual bool HookPreSaveEntity(EntityType entity)
HookPostSaveEntity
Hook method in which developers can place code to be executed after the entity has been saved
protected virtual void HookPostSaveEntity(EntityType entity)
HookPreSaveEntityList
Hook method in which developers can place code to be executed before the entity list is saved. If this method returns false, the save is aborted
protected virtual bool HookPreSaveEntityList(mmBindingList<EntityType> entityList)
HookPostSaveEntityList
Hook method in which developers can place code to be executed after the entity list has been saved
protected virtual void HookPostSaveEntityList(mmBindingList<EntityType> entity)
HookSetDefaultValues
Hook method in which developers can place code to set default values in the specified entity. This method is automatically called from the NewEntity() method before the call to HookPostNewEntity().
protected internal virtual void HookSetDefaultValues(EntityType entity)
Parent Business Object Hook Methods
HookParentAdding
Hook method in which developers can place code to be executed before a new record is added to the parent business object.
protected virtual void HookParentAdding(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentAdded
Hook method in which developers can place code to be executed after a new record is added to the parent business object.
protected virtual void HookParentAdded(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentCanceling
Hook method in which developers can place code to be executed before pending changes are canceled in the parent business object.
protected virtual void HookParentCanceling(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentCanceled
Hook method in which developers can place code to be executed before pending changes are canceled in the parent business object.
protected virtual void HookParentCanceled(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentDeleting
Hook method in which developers can place code to be executed before a record is deleted in the parent business object.
protected virtual void HookParentDeleting(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentDeleted
Hook method in which developers can place code to be executed after a record is deleted in the parent business object.
protected virtual void HookParentDeleted(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentNavigating
Hook method in which developers can place code to be executed before navigating in the parent business object.
protected virtual void HookParentNavigating(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentNavigated
Hook method in which developers can place code to be executed after navigating in the parent business object.
protected virtual void HookParentNavigated(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentRetrieving
Hook method in which developers can place code to be executed before retrieving data in the parent business object.
protected virtual void HookParentRetrieving(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentRetrieved
Hook method in which developers can place code to be executed after retrieving data in the parent business object.
protected virtual void HookParentRetrieved(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentPreSaving
Hook method in which developers can place code to be executed before saving data and BEFORE checking business rules in the parent business object.
protected virtual void HookParentPreSaving(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentSaving
Hook method in which developers can place code to be executed before saving data and AFTER checking business rules in the parent business object.
protected virtual void HookParentSaving(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentSaved
Hook method in which developers can place code to be executed after saving data in the parent business object.
protected virtual void HookParentSaved(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e)
HookParentTransactionBegin
Hook method in which developers can place code to be executed after a transaction has been started in the parent business object.
protected virtual void HookParentTransactionBegin(mmBusinessObject bizObj, ImmTransactionStateChangeEventArgs e)
HookParentTransactionCommit
Hook method in which developers can place code to be executed after a transaction has been commited in the parent business object.
protected virtual void HookParentTransactionCommit(mmBusinessObject bizObj, ImmTransactionStateChangeEventArgs e)
HookParentTransactionRollback
Hook method in which developers can place code to be executed after a transaction has been commited in the parent business object.
protected virtual void HookParentTransactionRollback(mmBusinessObject bizObj, ImmTransactionStateChangeEventArgs e)
See Also:
Establishing Business Object Relationships | Plugging into Business Object Events
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 07/15/18
Comment or report problem with topic
