Is there a way to disable Validation Rule with Apex Code? I need disable a managed Validation Rule in all customer orgs.
Tell me more
×
Salesforce Stack Exchange is a question and answer site for
Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.
|
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. eg
|
|||
|
