You are on page 1of 2

Homework:

Implement the below validations

Opportunities must have an Amount greater than 0

The “Amount” field is populated either by products being added to the Opportunity,
or users manually entering the number.

Example: You want to avoid blank or $0 values in the closed business reporting.

Answer:

OR( ISBLANK(Amount), Amount <= 0 )

------------------------

Contract End Date must be after the Contract Start Date


Use this Validation Rule on Contracts (or any other object, like Campaigns) where
two date fields represent a duration, and can be edited by users.

Example: The End Date must be after the Start Date.

Answer:

StartDate > EndDate

-----------------

Case Origin cannot be edited


Example: You want to prevent users from changing the “Case Origin” field after the
Case has been created.

Answer:

ISCHANGED (Origin)
&&
NOT( ISNEW() )

----------------------

If Case Status is not ‘New’, the Contact cannot be blank


Example: You want the agent to fill in the customer contact that has raised the
support request (linking it to the respective Contact record).

Answer

NOT (ISPICKVAL (Status, ’New’))


&&
ISBLANK (ContactId)

---------------------

You might also like