• galka
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 9
    Replies

Hi everyone,

 

I am having difficulties with creating  validation rules in the Opportunity page.  What I want is to have a validation rule for the CloseDate field depending on the value from the Stage picklist, as follows:

Stage: Presentation - Close date can't be within 6 months of today

 

AND(
OR (
ISPICKVAL(StageName, "Presentation/Demo"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 180 )

 

Stage: Quote Delivered - Close date can't be within 4 months of today

 

AND(
OR (
ISPICKVAL(StageName, "Quote Delivered"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 120 )

 

Stage: Quote accepted - Close date cannot be within 75 days.

 

AND(
OR (
ISPICKVAL(StageName, "Quote Accepted/Moving to Procurement"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 75 )

 

What is happening now is that the first rule (180 days) works seemingly fine.  But for the second and third, if the close date is outside of 120 days but less than 180 days, I get the error that it can't be within 180 days, and the same thing (with corresponding values for days) is happening for the third rule. 

 

What am I doing wrong? 

 

TIA,

 

G

 

  • June 29, 2012
  • Like
  • 0

Hi everyone,

 

I am having difficulties with creating  validation rules in the Opportunity page.  What I want is to have a validation rule for the CloseDate field depending on the value from the Stage picklist, as follows:

Stage: Presentation - Close date can't be within 6 months of today

 

AND(
OR (
ISPICKVAL(StageName, "Presentation/Demo"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 180 )

 

Stage: Quote Delivered - Close date can't be within 4 months of today

 

AND(
OR (
ISPICKVAL(StageName, "Quote Delivered"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 120 )

 

Stage: Quote accepted - Close date cannot be within 75 days.

 

AND(
OR (
ISPICKVAL(StageName, "Quote Accepted/Moving to Procurement"),
ISCHANGED( CloseDate )),
CloseDate - TODAY() < 75 )

 

What is happening now is that the first rule (180 days) works seemingly fine.  But for the second and third, if the close date is outside of 120 days but less than 180 days, I get the error that it can't be within 180 days, and the same thing (with corresponding values for days) is happening for the third rule. 

 

What am I doing wrong? 

 

TIA,

 

G

 

  • June 29, 2012
  • Like
  • 0