[SalesForce] How to Activate or deactivate workflow, Trigger, Validation rule and flow through apex class

Is it possible to activate or deactivate workflow,trigger,validation rule and flow through apex class ? If yes then how to achieve this..

Best Answer

I think one of the better ways is to use custom setting or any checkbox to bypass validation and workflow rules etc. You can check or uncheck the checbox from apex code.

ex: AND(
NOT(ByPass_VR__C),
...
Related Topic