Activating/deactivating trigger based on custom setting
Create a custom setting with Name TriggerSupport;
and Field Checkbox with Label TriggerOff
Click on Manage ---> Set Default value as true
Code for getting the custom setting value
TriggerSupport__c support = TriggerSupport__c.getInstance('TriggerOff__c');
system.debug('support'+support.TriggerOff__c);
Output:
USER_DEBUG [3]|DEBUG|supporttrue
Comments
Post a Comment