2
votes
Accepted
Validation rule to prevent users from closing cases before 9am
The time you pass to TIMEVALUE() needs to be enclosed in quotes (single or double).
TIMEVALUE("09:00:00")
1
vote
Prevents the deletion of contracts that are in active status
Validation rules cannot do it, you need a (before delete) trigger to prevent the deletion of a record and you must call addError().
If the only check is against Status field, the trigger is quite ...
1
vote
Accepted
How do I prevent going backwards in an opportunity once a specific step is reached?
You'll want to use the CASE statement. We'll convert each option to a numerical value, and generate an error if the step is lower than the previous step.
CASE(
StageName,
'New', 1,
'...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
validation-rule × 1078validation × 278
formula × 139
apex × 130
trigger × 63
picklist × 56
opportunity × 48
regular-expressions × 44
formula-field × 26
visualforce × 25
visual-workflow × 25
process-builder × 22
workflow × 18
custom-field × 18
administration × 18
lead-conversion × 17
record-type × 16
account × 15
case × 14
multi-select × 14
configuration × 13
community × 12
error-messages × 11
custom-object × 10
lookup × 10