Skip to main content

Saw a blog tidbit I thought was worth sharing widely here and to @Salesforce.org System Administrators​ everywhere! @Steve Molis​ is quoted in this Salesforce Ben post with the following great advice for writing and testing workflow rules:

"I also have a little admin life hack that I came up with while working with formulas. If you create or edit a formula in the formula editor, that little “check syntax” button makes sure that you’re not doing something illegal in your formula, like using an INCLUDES function on a checkbox field, or comparing datetime to just date. However, it doesn’t check the logic of your formula. (A+B)/C will give you a completely different result than A+B/C, but they are both syntactically correct.

So, to test my validation rule logic, I create a custom formula field on every object called “validation test,” and before I activate my validation rule, I put my validation rule formula in my formula checkbox field. Then I create a report or a list view that has all of the fields that the validation formula is evaluating, along with my checkbox right there.

This way, I can see if a record returns a true checkbox — meaning it would trigger and flunk my validation rule — or if it’s an unchecked checkbox — meaning it would pass my validation rule. This way, I can see if I’ve got a loophole."

 

That's one I plan to keep in mind!

3 comments
0/9000