Activity Forums Salesforce® Discussions How to check if a trigger is fired in Salesforce?

  • Shweta

    Member
    May 8, 2020 at 1:19 pm

    1. Go to Setup -> Administration Setup -> Monitoring -> Debug Logs.
    2. In the Monitored User, section add your user profile (or the user profile that you are testing the trigger with)
    3. Execute your trigger. For example, if you trigger is an "After Insert" trigger on Opportunity, then insert an Opportunity.
    4. Go back to the Debug Logs (Step 1 above). Note you may need to refresh this page to see the latest data.
    5. In the "Debug Logs" section of this page, you will see the logs. Click on the "View" link next to the log that captured your trigger activity.
    6. Once the log loads on a new page, look for a line item that begins with "USER_DEBUG" this will match with your System.debug(). Tip: In your browser in Windows do a search for USER_DEBUG (press CTRL + F) to easily find this line in the logs.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos