(You can use compound triggers to avoid the mutating-table error. To modify an object materialized by an object view in the client-side object cache and flush it back to the persistent store, you must specify INSTEAD OF triggers, unless the object view is modifiable. The column BASE_OBJECT_TYPE specifies whether the trigger is based on DATABASE, SCHEMA, table, or view. Once the execution has reached this stage, then process is fired if there are any declared on the object. This is one example of its use. In more realistic examples, you might test if one column value is less than another. Within the code of the trigger body, you can execute blocks of code depending on the kind of DML operation that fired the trigger: The first condition evaluates to TRUE only if the statement that fired the trigger is an INSERT statement; the second condition evaluates to TRUE only if the statement that fired the trigger is an UPDATE statement. You must perform a large data load, and you want it to proceed quickly without firing triggers. you can't pass a variable into a trigger. trigger is running in update mode it will return true and allow the block of { In a CREATE TRIGGER statement, the BEFORE or AFTER option is specified just before the triggering statement. For example, to enable the disabled trigger named Reorder, enter the following statement: To enable all triggers defined for a specific table, use the ALTER TABLE statement with the ENABLE clause and the ALL TRIGGERS option. When deciding whether to create a trigger to audit database activity, consider what the database's auditing features provide, compared to auditing defined by triggers, as shown in Table 9-2. When to use Database.queryLocator and when to use ... Action URL to delete a record in Visualforce page. They become invalid if a depended-on object, such as a stored subprogram invoked from the trigger body, is modified. Only committed triggers fire. If a field was updated then the before and after update triggers are fired once more and standard validation are also executed again.