Is there a way to disable Validation Rule with Apex Code? I need disable a managed Validation Rule in all customer orgs.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
It is common practice to have a boolean flag (say ByPass_VR__c), which can be set via Apex Code to skip it. Unless there is such a provision in this validation rule, you cant temporarily disable it via Apex code.
The only 'work around' is to set field values such that the error formula doesn't evaluate to true.