You are here:
Manage Apex Triggers
A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted.
Required Editions
| Available in: Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions |
| User Permissions Needed | |
|---|---|
| To define, edit, delete, and set version settings for Apex triggers: | Author Apex |
Triggers are stored as metadata in Salesforce. A list of all triggers in your organization is located on the Apex Triggers page in Setup. Triggers are also associated and stored with specific objects and are listed in the object management settings for each object. For additional development functionality, use the Developer Console.
You can add, edit, or delete Apex using the Salesforce user interface only in a Developer
Edition organization, a Salesforce Enterprise Edition trial organization, or sandbox
organization. In a Salesforce production organization, you can change Apex only by using the
Metadata API deploy call, the Salesforce Extensions for
Visual Studio Code, or the Ant Migration Tool. The Salesforce Extensions for Visual Studio
Code and Ant Migration Tool are free resources provided by Salesforce to support its users
and partners, but are not considered part of our Services for purposes of the Salesforce
Main Services Agreement.
- A
icon
indicates that an Apex trigger is in an installed managed package. You cannot edit or
delete a trigger in a managed package. - A
icon
indicates that an Apex trigger in a previously released managed package will be deleted on
the next package upload. You can choose to undelete the Apex trigger through the package
detail page.
- Click New to create an Apex trigger. You can only create triggers from the associated object, not from the Apex Triggers page.
- Click Edit next to the trigger name to modify its contents in a simple editor.
- Click Del next to the trigger name to delete the trigger from your organization.

