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
Knowledge 기사 번호

000383389

 
로드 중
Salesforce Help | Article