You are on page 1of 2

Validation rules :

Object-name: Account
Created by pepeti ravi

Functions used:
Error message
Account amount should not be blank and isnumber only
AND(
NOT(ISBLANK(AccountNumber)),
NOT(ISNUMBER(AccountNumber))
)
1) Account number is should be 8 not less than 8

LEN( AccountNumber) != 8

2) Validates that a custom date field contains a date within the current year
YEAR( My_Date__c ) <> YEAR ( TODAY() )

3) Validates that a custom field called Delivery Date is provided if an


opportunity has advanced to the Closed Won or Negotiation/Review stage

AND (
OR (
ISPICKVAL(StageName, "Closed Won"),
ISPICKVAL(StageName, "Negotiation/Review")),
ISBLANK(Delivery_Date__c)
)

Delivery Date is required for this stage

4) Validates that a custom discount percent field is between 0 and 40%.

OR(Discount_Rate__c < 0, Discount_Rate__c > 0.40)

5) Restrict Status of Re-Opened Cases


Validates that the case Status is “Re-opened” when a closed case is opened again
Closed case can only be changed to “Re-opened.”

AND( ISCHANGED( Status ), OR( ISPICKVAL(PRIORVALUE( Status ), "Closed"),


ISPICKVAL(PRIORVALUE( Status ), "Closed in SSP")), NOT( ISPICKVAL( Status, "Re-
Opened")) )

6) Validates that the Phone number begins with a plus sign (+) for country code. Note
that this validation rule conflicts with the ten-digit rule
LEFT(Phone, 1) <> "+"

7) You require contact information (phone number, email) to ensure the


qualified lead can be contactable. You also want BDRs to pass on a “Rating”
to the next rep that will be handling the opportunity stages

IsConverted
&&
OR(
ISBLANK (Phone),
ISBLANK (Email),
ISPICKVAL (Rating, “”)
)

8) Validates selected currency against an explicit subset of active currencies in your


organization using the Currency picklist
Ans)

CASE(CurrencyIsoCode,
"USD", 1,
"EUR", 1,
"GBP", 1,
"JPY", 1,
0) = 0

9) Close_Date_Alert

AND( NOT( IsClosed ), CloseDate < TODAY() )

The close date must be today or later not before

You might also like