• Kraftti1
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

I created a custom object that i would like to trigger the creation of a Case when the object is created or updated with an open status. I found a previously writen trigger that I am using:

 

trigger CreateCase on PE_Case__c(After Update)

{

    if(Trigger.isUpdate){
        for(PE_Case__c  p: Trigger.new)

       {

          if(p.Status__c == 'Open')

          {

               Case cs = new Case();

              

                  cs.Reason = 'Internal';

 

                insert c;

          }
        
        }
    } 

}

 

Saleforce is accepting the trigger with no errors, but it is not firing.

 

Any help would be appreciated.

I created a custom object that i would like to trigger the creation of a Case when the object is created or updated with an open status. I found a previously writen trigger that I am using:

 

trigger CreateCase on PE_Case__c(After Update)

{

    if(Trigger.isUpdate){
        for(PE_Case__c  p: Trigger.new)

       {

          if(p.Status__c == 'Open')

          {

               Case cs = new Case();

              

                  cs.Reason = 'Internal';

 

                insert c;

          }
        
        }
    } 

}

 

Saleforce is accepting the trigger with no errors, but it is not firing.

 

Any help would be appreciated.