Let the platform do the work

Module Hooks

Module hooks execute logic when working with Sugar modules (e.g. Accounts, Cases, etc.).

Topics

The after_delete hook executes after a record is deleted.
The after_fetch_query logic hook executes after a sugar query has been executed.
The after_relationship_add hook executes after a relationship has been added between two records.
The after_relationship_delete hook executes after a relationship between two records has been deleted.
The after_restore hook executes after a record gets undeleted (i.e. the deleted field's value changes from 1 to 0).
The after_retrieve hook executes after a record has been retrieved from the database.
The after_save hook executes after a record is saved.
The before_delete logic hook executes before a record is deleted.