Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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;
    System.debug('hello');
    OpportunityController.validateOrder(opportunityMap);
}

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

share|improve this question
1  
What fails? Do you get an error or is the code simply not executing? –  dphil Jun 9 at 15:30
2  
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 at 16:12

1 Answer 1

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 at 16:14
1  
@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 at 7:41

Your Answer

 
discard

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.