O'Reilly logo

Force Platform Fundamentals: An Introduction to Custom Application Development in the Cloud by Andrea Leszek, Adam Gross, Nick Tran, Dave Carroll, Caroline Roth, Chris McGuire

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing Validation Rules

Now that we’ve defined all the fields that we want on our Position object, let’s see if we can articulate a couple of rules about the data that should be entered into those fields. Even though the recruiters and hiring managers at Universal Containers are bright people, everyone sometimes makes mistakes when filling out a form, and a good app should catch the obvious errors.

For example, does it ever make sense for the value of the Min Pay field to be more than the value of the Max Pay field? Or should Close Date ever be unspecified if the Status field is set to Closed - Filled or Closed - Not Approved? Clearly not. We can catch these sorts of errors in our app with yet another built-in feature of the platform:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required