Skip to main content
added 318 characters in body
Source Link
Priyalakshmi
  • 1.5k
  • 2
  • 21
  • 40
trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
        if(Trigger.isUpdate){
             if(classA.Method1){    
                webServices.notify(Trigger.New[0].Id);
                ClassA.Method1 = true;                
             }
        }
        if(Trigger.isAfter){
            if(Trigger.isInsert){
                if(ClassA.method1) {  
                    webservice.CcNotification(Trigger.New[0].Id);
                    ClassA.method1 = true;
                }
            }
        }

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

My testclass:

@isTest(SeeAllData=true)
public class CaseTri{
public static testMethod void testnotif(){
Case c = new Case();
insert c;
Test.startTest();
Test.setMock(WebServiceMock.class, new WebServiceMockImplnotif());

  
  Test.stopTest();
}
}
trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
        if(Trigger.isUpdate){
             if(classA.Method1){    
                webServices.notify(Trigger.New[0].Id);
                ClassA.Method1 = true;                
             }
        }
        if(Trigger.isAfter){
            if(Trigger.isInsert){
                if(ClassA.method1) {  
                    webservice.CcNotification(Trigger.New[0].Id);
                    ClassA.method1 = true;
                }
            }
        }

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
        if(Trigger.isUpdate){
             if(classA.Method1){    
                webServices.notify(Trigger.New[0].Id);
                ClassA.Method1 = true;                
             }
        }
        if(Trigger.isAfter){
            if(Trigger.isInsert){
                if(ClassA.method1) {  
                    webservice.CcNotification(Trigger.New[0].Id);
                    ClassA.method1 = true;
                }
            }
        }

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

My testclass:

@isTest(SeeAllData=true)
public class CaseTri{
public static testMethod void testnotif(){
Case c = new Case();
insert c;
Test.startTest();
Test.setMock(WebServiceMock.class, new WebServiceMockImplnotif());

  
  Test.stopTest();
}
}
changed indentation
Source Link
martin
  • 12.8k
  • 10
  • 50
  • 75
trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
        if(Trigger.isUpdate){
 
             if(classA.Method1) 
             {    
 
                webServices.notify(Trigger.New[0].Id);
                 ClassA.Method1 = true;
                 
             }
        }
        if(Trigger.isAfter){
            if(Trigger.isInsert){
   if(ClassA.method1) {  
            if(ClassA.method1) {  
                    webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
                
   ClassA.method1 = true;
        
         }
            }
        }

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
 if(Trigger.isUpdate){
 
             if(classA.Method1) 
             {    
 
                webServices.notify(Trigger.New[0].Id);
                 ClassA.Method1 = true;
             
        }
    }
    if(Trigger.isAfter){
        if(Trigger.isInsert){
   if(ClassA.method1) {  
               
                webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
                
             
         }
    }
}

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
        if(Trigger.isUpdate){
             if(classA.Method1){    
                webServices.notify(Trigger.New[0].Id);
                ClassA.Method1 = true;                
             }
        }
        if(Trigger.isAfter){
            if(Trigger.isInsert){
                if(ClassA.method1) {  
                    webservice.CcNotification(Trigger.New[0].Id);
                    ClassA.method1 = true;
                }
            }
        }

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

added 2 characters in body
Source Link
Ratan Paul
  • 22.8k
  • 14
  • 55
  • 99
trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
 if(Trigger.isUpdate){

             if(classA.Method1) 
             {    

                webServices.notify(Trigger.New[0].Id);
                 ClassA.Method1 = true;
            
        }
    }
    if(Trigger.isAfter){
        if(Trigger.isInsert){
   if(ClassA.method1) {  
              
                webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
                
            
        }
    }
}

webservice.CcNotification(Trigger.New[0].Id);webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
 if(Trigger.isUpdate){

             if(classA.Method1) 
             {    

                webServices.notify(Trigger.New[0].Id);
                 ClassA.Method1 = true;
            
        }
    }
    if(Trigger.isAfter){
        if(Trigger.isInsert){
   if(ClassA.method1) {  
              
                webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
                
            
        }
    }
}

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

trigger CaseTri on Case (after insert) {
    if(Trigger.isAfter){
 if(Trigger.isUpdate){

             if(classA.Method1) 
             {    

                webServices.notify(Trigger.New[0].Id);
                 ClassA.Method1 = true;
            
        }
    }
    if(Trigger.isAfter){
        if(Trigger.isInsert){
   if(ClassA.method1) {  
              
                webservice.CcNotification(Trigger.New[0].Id);
ClassA.method1 = true;
                
            
        }
    }
}

webservice.CcNotification(Trigger.New[0].Id);->line which calls future method

Source Link
Priyalakshmi
  • 1.5k
  • 2
  • 21
  • 40
Loading