Friday, June 20, 2014

Sometimes you may only want the validation rule to prevent saves for some people

Sometimes you may only want the validation rule to prevent saves for some people. In that case, I like to use a hierarchical custom setting so I can turn off validation rules for the entire org, specific profiles or specific users. In your validation rule formula, you can reference hierarchical settings using $Setup.Setting_Name__c.Field_Name__c.
So, putting it all together, here is what I think a good validation rule should look like:
validation rule example

Source from : http://www.verticalcoder.com/

2 comments: