Loading
Salesforce now sends email only from verified domains. Read More
Enhance Salesforce with Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Manage Apex Triggers

          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 Managed - Installed icon indicates that an Apex trigger is in an installed managed package. You cannot edit or delete a trigger in a managed package.
          • A Managed - Deleted 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.
          Note
          Note The namespace prefix is added to Apex classes and triggers, Visualforce components and pages, brand templates, folders, s-controls, static resources, web links, and custom report types if they are included in a managed package. However, if you don't have customize application permissions, the namespace prefix field is not displayed for brand templates, folders, and custom report types.
          • 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.
           
          Loading
          Salesforce Help | Article