I created a validation rule in a development environment then deployed it in a change set. After Business Requirements changed I needed to deactivate the validation rule.

Then I created a new change set with the inactive validation rule. When the new change set was deployed it was deployed with an "active" status.

Why did the Validation rule not deploy with an inactive status?

  • 2
    did you rename the validation rule between deployments? – cropredy Jan 16 '17 at 23:40
  • I did rename the validation rule. Does that mean I will have two different validation rules in the target organizations? – JurassicBob Jan 17 '17 at 1:08
  • 1
    Yes indeed! The VR name if changed, means a new VR when pushed thru changesets – cropredy Jan 17 '17 at 1:26
  • Nice catch @cropredy – Santanu Boral Jan 17 '17 at 2:43
  • Thank you for that catch! That saved me about a day of turn around time! After some digging I also found that y organization has a trigger that sets all VR to active upon deploy, as a safety measure that it plays well with other components. Thanks for answering my question @cropredy! – JurassicBob Jan 17 '17 at 14:04

If you rename a Validation rule in between deployments, a Changeset will transfer it over as a new Validation rule (!)

Here's the metadata for a Validation Rule

    <errorConditionFormula>Event_Date_Start__c &gt; Event_Date_End__c</errorConditionFormula>
    <errorMessage>Event End Date must be equal to or after Event Start Date</errorMessage>

If I deployed the above and then renamed the VR in the UI to


and then deployed again, I get a new rule. There's no label versus API name for a VR.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.