Photo by Giorgio Trovato on Unsplash
This week I wrote my first validation rule that’s live in an actual org (and not just on trailhead). It was fairly simple, just:
AND(
ISBLANK(Phone),
ISPICKVAL(Status, "Contacted")
)
This stopped users from marking a lead as “Contacted” unless they had actually added a phone number.
After months of just setting up profiles and building reports, it felt like I was doing something to help in setting guardrails for the org. No more incomplete data. No more garbage in, garbage out.
Here’s what I learned about validation rules while working on this:
Always write clear error messages
Make sure you're not blocking critical automations
Test edge cases before deploying
This felt great. I can’t wait to write more validation rules (when needed) to make my org function better and save it from devolving into chaos.