11 ValidationRules Two
11 ValidationRules Two
Stage Rule
Formula:
CASE( StageName ,
'FirstInstalment', 1,
'Second Instalment', 1,
'Qualification', 0,
0
) == 0
MEssage: Stage must be either FirstInstalment or second instalment
location: stage
* ON selctiing other than first or second instalment
result is 0
*****************************************************
*****************************************************
Weekend Validation Rule
opp tab - sc - view validation rules - CLick "more Examples"
displays list of validation Rules
sele "Date Validation"
****************************************************
Formula:
CASE( MOD( CloseDate - DATE(1900, 1, 7), 7),
0, 0,
6, 0,
1) = 0
Result: Date must not WEEK end
****************************************************
Formula:
CASE( MOD( CloseDate - DATE(1900, 1, 7), 7),
0, 0,
6, 0,
1) = 1
Result: Date mut not be WEEK DAy
***************************************************
***************************************************
Account Validations
CUrrent and Previous Value must not similar
***************************************************
Formula:
Name == PRIORVALUE( Name )
Message:
Current name and Previous values are SImilar
location: Name
***************************************************
PHone Validation
Formula
NOT(REGEX( Phone , "[0-9]{3}-[0-9]{3}-[0-9]{4}"))
Message:
Phone number must be 999-999-9999
* Regex : is Regular Expression
******************************************************
Fax Validation
First letter must be alphabet
next 3 chars must be Digits
Formula:
NOT(REGEX( Fax , "([A-Z]\\d{3})?"))
Message:
Fax must be A999
********************************************************
Website validation
website must be .com only
Formula
RIGHT( Website , 4) <> ".com"
Message
Only .com websites are accepted
*****************************************************
Display Error message, name is modified by other user
Formula:
and (
ISCHANGED( Name ),
OwnerId <> $User.FirstName,
$Profile.Name <> "System Administrator"
)