---
schema_version: "1"
id: eb87491661bfab8bdc719900fa9a4c629f60f368f3b1347fb2f52a2e24b13ed1
title: View Apex Trigger Details
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_view_trigger.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_view_trigger.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3d1cdbe8ea1ecc8c75888c257416b1fbdad8c7f05ff3e6121bd2b946acdccd38
description: Apex triggers are stored as metadata in the application under the object with which they are associated.
products:
  - Salesforce Platform
release: "264"
---
# View Apex Trigger Details

Apex triggers are stored as metadata in the application under the object with which they are associated.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic (<a href="https://help.salesforce.com/s/articleView?id=xcloud.overview_edition_lex_only.htm&amp;type=5&amp;language=en_US" target="_blank">not available in all orgs</a>) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <span id="code_view_trigger__Apex_Code_editions_text"><a name="code_view_trigger__Apex_Code_editions_text"></a><strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Database.com</strong> Editions</span></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d27301e80">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d27301e80 ">To edit Apex triggers:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d27301e80 ">Author Apex</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d27301e80 ">To view Apex triggers:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d27301e80 ">View Setup and Configuration</td>

          </tr>
        </tbody>
      </table>

You can also view all triggers in Setup by entering Apex Triggers in the Quick Find box, then selecting **Apex Triggers**.

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.

- To view the details for a trigger, from Setup, enter Apex Triggers in the Quick Find box, then select **Apex Triggers**, then click the name of the trigger. You can also access the trigger details from the object management settings for an object.
- From the trigger detail page, you can:
    
    - Click **Edit** to modify the contents of the trigger.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)
        
        Note A ![Managed - Installed](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/icoManagedInstalled.gif) icon indicates that an Apex trigger is in an installed managed package. You cannot edit or delete a trigger in a managed package.
    - Click **Delete** to delete the trigger from your organization.
    - Click **Show Dependencies** to display the items, such as fields, s-controls, or classes, that are referenced by the Apex code contained in the trigger.
    - Click **Download Apex** to download the text of the trigger. The file is saved with the name of the trigger as the file name, with the filetype of .trg.

The trigger detail page shows the following information for a trigger:

- The name of the trigger
- The name of the object with which the trigger is associated, such as Account or Case.
- The API version that the trigger has been saved against.
- Whether a trigger is valid.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)
    
    Note Triggers are stored with an `isValid` flag that is set to `true` as long as dependent metadata has not changed since the trigger was last compiled. If any changes are made to object names or fields that are used in the trigger, including superficial changes such as edits to an object or field description, the `isValid` flag is set to `false` until the Apex compiler reprocesses the code. Recompiling occurs when the trigger is next executed, or when a user resaves the trigger in metadata.
    
    If a lookup field references a record that has been deleted, Salesforce clears the value of the lookup field by default. Alternatively, you can choose to prevent records from being deleted if they’re in a lookup relationship.
- Whether the trigger is active.
- The text of the Apex code contained in the trigger.
- If trigger references components in installed managed packages, such as an Apex class, a Visualforce page, a custom object, and so on, the Version Settings section lists the package versions of the packages containing the referenced components.
- If the trigger is contained in an installed managed package, the Installed Package indicates the package name.

The **Log Filters** tab displays the debug log categories and debug log levels that you can set for the trigger. For more information, see [Debug Log Filtering for Apex Classes and Apex Triggers](https://help.salesforce.com/s/articleView?id=platform.code_debug_log_classes.htm&release=264.0.0&type=5 "Debug log filtering provides a mechanism for fine-tuning the log verbosity at the trigger and class level.").

#### See Also

- [Find Object Management Settings](https://help.salesforce.com/s/articleView?id=platform.extend_click_find_objectmgmt_parent.htm&type=5&language=en_US)
- [Application Unit Tests](https://help.salesforce.com/s/articleView?id=platform.code_run_tests.htm&release=264.0.0&type=5 "Run Apex and automated flow unit tests on methods, classes, sets of classes, or your whole org.")
- [_Apex Developer Guide_](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm)