Skip to main content
I need to prevent an Apex Trigger from firing during the cloning of a record.  Can I use the value of a checkbox to prevent the trigger from firing?
6 answers
  1. Nov 15, 2018, 7:58 PM
    Ty like this

     

    trigger triggerCase on Case (after delete, after insert, after undelete, after update, before delete, before insert, before update) {

    if(Trigger.isBefore){

    if(Trigger.new[0].checkbox__c){

    // Do do any tiink

    // You can move all before logic in the apex class and call the class from the trigger

    }else{

    call logic here

    }

    }

    }

     
0/9000