Skip to main content
CRMSalesforce CRM

Salesforce.com – Using Validation Rules

By April 28, 2017No Comments

This is kind of an oldie but a goodie, bring back to life a post from long ago just because I think validation rules are so helpful.  A lot of my clients tend to go down the rules of “required” fields but that doesn’t always work.  In that case, use a formula to validate fields, popping up a warning when something isn’t correct — thereby prompting the user to add in data.

In our case here, we’re going to do a rule that creates a warning if the user chooses a type of value, and we want something to clarify that value.  Here, I want to create a validation so that when someone tells me that they have Goldmine as a product, I put in their version as well (other products in this picklist don’t have a version, hence the need for GM only).

So, as always, let’s go to setup and search for “validation”.  You’ll get a lot, so look for the object we care about — here we need the account object.

Click it, then on the next page click the new button.  There’s a lot on this page so we’ll break it down by the top half (the error condition) and the bottom half (the error message).  It’s pretty straight forward what each section is, but the top is to kick off the warning, the bottom is what the warning says.

In the top, give the rule a name.  Then let’s get to the formula.  I’ve made it a bit trickier here as I have 3 different picklist items for GoldMine (hence the “begins”) idea to trigger the item.  I also have to convert the picklist to text since it’s a picklist field.  Use the “check syntax” button to check the formula.  The AND portion of this formula is to only fire when that second field is blank (important to put this part otherwise it warns you and never let’s you out).

On the bottom half, we now put in the message.  You can have this message appear next to the field or at the top.  I prefer the top.

Save it and test!  Remember, this fires on any edit after it’s in place, not just that field.  Could cause some unwanted warnings when editing other fields, just be aware of this.

 

Corey Babka

Author Corey Babka

More posts by Corey Babka

Leave a Reply

5 Great Alternatives to SalesForce.com

Free Whitepaper Download

Learn more about 5 options that are better CRMs for small business

DOWNLOAD WHITEPAPER

Skip to content