I have one validation rule on account which will fire when user tries to change country value.


Once billing country is entered we can't change it. It is working fine when we tested but we have one third party application which will update the address fields but country will remain same, even though we are not changing the country value this validation rule is firing. Any suggestion how to stop this validation rule to fire when we are updating country with same value.

Thanks in advance

  • is the 3rd party app changing the BillingCountry from say, United States to UNITED STATES?
    – cropredy
    Commented Jul 19, 2016 at 4:43
  • Yes you are correct @cropredy Commented Jul 19, 2016 at 5:14

4 Answers 4


If, as you assert, the third party application is changing the BillingCountry to the same logical value but using a different text case, as in

  • Original value = United States
  • New value = UNITED STATES

you will need to change the validation rules to be case insensitive.

NOT(ISNEW()) && 
LOWER(BillingCountry) <> LOWER(PRIORVALUE(BillingCountry))

Of course, after the 3rd party app has done its update, the value of BillingCountry will become UNITED STATES thus altering the original value's case. If you need to preserve the original case, you'll need to have a shadow version kept in a hidden variable that you restore after every update (this can be done with workflows)


There is no function called ONCHANGED. Guess you mean ISCHANGED. For your request, try following:

 AND(ISCHANGED(BillingCountry), PRIORVALUE(BillingCountry)<>BillingCountry)

Not sure how you allow to enter it first time.

  • I tried it but still it's not working Commented Jul 19, 2016 at 5:13
  • @salesforceDeveloper can you be more specific? what does not work?
    – Andrei.Z
    Commented Jul 19, 2016 at 5:57
AND(ISCHANGED(BillingCountry), PRIORVAL(BillingCountry) != BillingCountry)

There is no function called onChanged in validation rules, I think simple ISCHANGED(BillingCountry) should work.

I tested it with SOAP UI and it works


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .