Make Your Project Work for You – Validation Rules

Brandi Johnson

Jul 15 2015 7 min read

Today’s business is data driven – that’s probably one of the many reasons you have implemented Cloud Coach and Salesforce in your organization. The ability to report on, segment and view your business data in hundreds, if not thousands of ways provides power and flexibility. Of course, your ability to put this data to use in your business is only as good as the data itself – which is why data validation rules are important. You’ll save yourself (and your team) hours of time by ensuring data is entered correctly the first time.

Validation Rules help you improve the quality of your data by verifying that the data entered by a user meets the standards you specify. If the data doesn’t meet your specifications, then the user cannot save their changes to the record.

A validation rule is simply a formula with a true or false outcome. This true/false outcome determines whether the record can be saved or not. When the formula evaluates to true, the data is bad/incorrect and we cannot allow the user to save the record. When the formula evaluates to false, the data is good/correct and the user can save the record. (Be sure you note this – if your rule = TRUE, then the record cannot be saved. This may be opposite to the logic than you expect in this instance.)

When you create a validation rule, we recommend you include an error message for your user in case their changes are not saved. This error message can be either at the top of the page, or beside the field. With the custom text you add to the message, you should let the customer know what they need to do in order to save their changes.

Creating a New Validation Rule

In this example we are going to use a simple Budget field to store the Cloud Coach Project budget amount. Once the Project contract has been signed, users should not be able to change the budget field. To prevent this field value from being reduced we will create a validation rule.

To create a validation rule, navigate to the Setup area.
For standard objects such as Accounts and Opportunities: Customize > Accounts > Validation Rules
For custom objects you have created or installed: Create > Objects > Object Name > Validation Rules

ValidationRule Image1Accounts
Validation Rules Image1

Create a new rule by clicking New and giving your rule a name. We will call our rule Budget Can’t Reduce When Contract Signed. Enter a description and ensure the Active box is checked.

Validation Rules Image2

From here we need to enter the Error Condition Formula. 

Remember: 

– A TRUE outcome means the record cannot be saved, as the data is incorrect
– A FALSE outcome means that the record can be saved, as the data is correct

Our formula must contain a reference to both the Budget field and the Contract Status field. Use Insert Field, Insert Operator, and Functions to add fields and formula elements to your Error Condition Formula.

Our rule shown below states that if the Contract Status equals ‘Signed’ and the prior value of the Budget field is greater than the new value on the Budget field then our formula will evaluate to true.

Validation Rules Image3

Once you have entered your formula you can confirm there are no errors by clicking Check Syntax.

You should also enter an error message that will be displayed to the user when the record cannot be saved, the message can either appear at the top of the page or beside the field that is causing the error.

Validation Rules Image4

Click Save.

Testing Your New Validation Rule

You should always test your validation rule to ensure it works the way you intended. As you can see, the Contract Status is ‘Signed’.  When we attempted to reduce the Budget from $50,000 to $30,000, we received the error message below.

Validation Rules Image5

When dealing with a lot of information in Cloud Coach, it is beneficial to have validation rules in place to ensure the data is correct rather than having users looking through reports to ensure the information entered is as it should be. Validation rules help you maintain data integrity and prevent any changes that should not be made.

Validation rules are a great way to improve the quality of your data. Try creating one for yourself!

Whether you are looking for project management, or professional services automation tools on the Salesforce platform, Cloud Coach has the tools for you. Request a demo today and learn how you can more quickly and efficiently manage your business, leveraging the Salesforce platform.

AUTHOR

Brandi Johnson

Related Articles

How Can I Track Project Changes?

Changes are a reality of running projects. And tracking those changes is critical for getting a full understanding of the...

Nic Widhalm

May 7 2017 6 min read

Want to see Cloud Coach in action?

Cloud Coach is secure and customisable platform for successfully delivering customer projects of all shapes and sizes.

See Cloud Coach In Action

Cloud Coach is secure and customisable platform for successfully delivering projects of all shapes and sizes.

Schedule a tailored demo with one of our project specialists.

  • Fill out the form below
  • Our team will reach out within 24 hours to discuss your unique requirements
  • We’ll schedule a 1:1 demo with one of our product specialists  
medal 2 1
reCAPTCHA logo@2x

protected by reCAPTCHA

medal 2 1

Thank you

A Cloud Coach advisor will be in contact by email within one working day to arrange your demo.