Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On updating the opportunity, the trigger should get triggered. But it fails. Below is the trigger code which calls a method in apex class if it is triggered.

trigger TotalOrder on Opportunity (after insert, after update) {
    Map<ID, Opportunity> opportunityMap = Trigger.newMap;

Even the System.debug is not working. Can anyone please suggest something?

share|improve this question
What fails? Do you get an error or is the code simply not executing? – dphil Jun 9 '14 at 15:30
Note that the debug might not be appearing because your debug logs are not detailed enough and/or truncating the debug message because the log is too big. – sfdcfox Jun 9 '14 at 16:12

Is the trigger set as "active"? Setting is on the edit page of the trigger enter image description here

share|improve this answer
Yes the trigger is active and it doesn't even display the debug message. So this means the trigger is not triggered itself.. So please provide some solution. – user9797 Jun 9 '14 at 16:14
@Vetriselvan The debug message may not display if your log is too long, or your log levels are too low (you're logging at the default level). You might try dialing up the log filters so they show less data, and log at the error level, such as System.debug(LoggingLevel.ERROR, ...) – sfdcfox Jun 10 '14 at 7:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.