We are working on an app which has functionality to perform a large number of record updates in a batch.
We would like to be able to programmatically disable all triggers at the start of the batch logic, execute the record updates, and then reactivate all triggers programmatically once the batch has finished.
Can anyone suggest a solution in terms of api calls we could make via apex (or a solution similar) to achieve this programmatically?
Answers to other issues that already exist or have been highlighted as duplicated point to the deploy() file based method of the metadata api but I can't see how I achieve the above using this method. Would I have to do a metadata api file based retrieve of all trigger objects in the system, change the metadata xml for each to set the trigger as inactive, and then deploy all of the triggers again? (for an org that has a large number of triggers this would be a very significant operation)
deploy
call.