# IF_Trigger

**Class** · Group: `Triggers`

Learn it: [Fast Start - Trigger Actions](/fast-start-trigger-actions) and [Triggers guide](/triggers-guide)

<div class="apex-member apex-class">

```apex
global inherited sharing class IF_Trigger
```

Contracts for metadata-driven trigger action handlers. Each nested interface corresponds to a Salesforce trigger event and defines the callback signature that handler classes must implement. Handlers extend TRG_Base and declare the interfaces matching the events they handle; the TRG_Dispatcher invokes the correct callback at runtime based on TriggerAction__mdt configuration. Adapted from: apex-trigger-actions-framework

**Example**

```apex
public class TRG_SetDefaults extends TRG_Base implements IF_Trigger.BeforeInsert
{
    public void beforeInsert(List<SObject> newRecords)
    {
        for(SObject record : newRecords)
        {
            record.put('Status__c', 'New');
        }
    }
}
```

**See Also:** [TRG_Base](/reference/apex/trg-base)

</div>

---

## Inner Classes

| Class | Description |
|-------|-------------|
| [AfterDelete](/reference/apex/if-trigger-afterdelete) | Handler contract for the after-delete trigger event. |
| [AfterInsert](/reference/apex/if-trigger-afterinsert) | Handler contract for the after-insert trigger event. |
| [AfterUndelete](/reference/apex/if-trigger-afterundelete) | Handler contract for the after-undelete trigger event. |
| [AfterUpdate](/reference/apex/if-trigger-afterupdate) | Handler contract for the after-update trigger event. |
| [BeforeDelete](/reference/apex/if-trigger-beforedelete) | Handler contract for the before-delete trigger event. |
| [BeforeInsert](/reference/apex/if-trigger-beforeinsert) | Handler contract for the before-insert trigger event. |
| [BeforeUpdate](/reference/apex/if-trigger-beforeupdate) | Handler contract for the before-update trigger event. |
| [PostAction](/reference/apex/if-trigger-postaction) | Handler contract for a post-trigger action — an Apex class that runs exactly once at the end of a trigger transaction, after every trigger action on every touched SObject has completed. |
| [PostActionContext](/reference/apex/if-trigger-postactioncontext) | Context handed to a post-trigger action when the dispatcher unwinds the outermost trigger dispatch. |
| [PostActionEntryCriteria](/reference/apex/if-trigger-postactionentrycriteria) | Optional entry-criteria contract for a post-trigger action. |
