Validation Rule Failing for NO REASON

  • 1
  • Problem
  • Updated 3 years ago
I know this isn't Skuid related, but I'm not really interested in using another community. :D

This is like "5' nothing and like 100 pounds" Uber weird.

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Before posting a substantive response, I'm just going to say that every part of your question description is hilarious. And that "5' nothing and like 100 pounds" Uber weird" very effectively connotes to me a substantial quantity of weirdness. 
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
I have a feeling it has to do with the Rollup field's value , maybe how it's rounded up or some invisible decimal

Try this formula just to be able to pinpoint the issue to a specific value (removing the checkbox logics)

Not(Total_Credit__c = Total_Debit__c)

Then try to save that problematic record

If returns validation error, try this

Not(round(Total_Credit__c,2) = round(Total_Debit__c,2))
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
I must not and cannot use rounding. The values need to be exactly the same. Custom Accounting app.

Additionally the values are exactly the same to begin with. The record is being flagged in error.
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
I only asked to do this for testing purposes and confirm where the issue lies

If by rounding (you can round to 5 decimals if u want) the validation does not trigger, you will be 1 step closer to finding the underlying issue
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Now this is weird!!! I was trying a few more things and decided to delete the Journal Entry and recreate it.

I did, the records and values are exactly the same and now it works!

I've seen this once before where EVERYTHING looked fine but errors occurred. That time I deleted and recreated the records and the same thing happened.

Do Salesforce records ever become "corrupt"?