Loading

Create a Validation Rule for an Opportunity in which Close Date is less than Created Date

Дата публикации: Apr 2, 2026
Описание
To create a validation rule for opportunity wherein the close date is less than the created date, we use the following syntax:  CloseDate < DATEVALUE(CreatedDate)

However, this rule does not work on Opportunity creation because no 'CreatedDate' value exists yet. In this case, include ‘CreatedDate’ as ‘NULL’ in order to trigger the rule on the creation of an Opportunity.
Решение


Steps to Create a Validation Rule for Opportunity records with Close Date that is less than Created Date


In Lightning Experience: Setup > Object Manager > Opportunity > Validation Rules

In Salesforce Classic: Setup > Customize > Opportunities > Validation Rules
 

  1. Click New
  2. Enter a Rule Name
  3. Under the Error Condition Formula, enter the formula: CloseDate < (IF(ISNULL(CreatedDate), TODAY() , DATEVALUE(CreatedDate)))
  4. Enter an Error Message
  5. For Error Location, select Top of page
  6. Click Save
Дополнительные ресурсы

Validation Rules

DATEVALUE

Номер статьи базы знаний

000383389

 
Загрузка
Salesforce Help | Article