Usually, when a trigger is started, we check which profile the user has, and if this is the type in which we do not want to trigger triggers, then we exit the trigger before any other code is run.
Problem: we have installed the SF package, which we purchased from some other company, and all its code is invisible to us and cannot be edited. How can we stop some of these triggers from starting besides manually disabling them through the interface? I want to temporarily disable them when starting a test class.
Thought of doing something similar, but got the error message "DML not allowed on ApexTrigger."
ApexTrigger at = [select id from ApexTrigger where name='SomeTriggerName'];
at.status = 'Inactive';
update at;
source
share