function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WellerHWellerH 

Opportunity Close Date cannot be in past only when stage/probability is changed

I'm still pretty much baffled by formulas (is there a "formulas for dummies" guide out there??).  I'm assuming this is one of those things that is completely easy for someone who knows what they're doing, but that's just not me (yet!).

 

Anyhow - we added a validation rule to Opportunities that the close date can't be in the past, which works as it should, but isn't really what we need. 

CloseDate < TODAY()

What we *actually* want is for the rule to only be triggered when either the Stage or Probability fields are changed, but not when other fields are edited.

  

Steve :-/Steve :-/

I'm not sure why you don;t want to force them to update the Closed Date any time that they try to edit a lapsed Opportunity, but anyway here's the code to do what you're looking for.

 

 

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

But I would recommend just using this one.  If the Close Date has passed but the Opportunity is still open they should be forced to update it any time that they edit the Opportunity.

 

 

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

 

 

 

 

 

WellerHWellerH
Thank you!

(To answer why we don't want the close date changed once the opportunity is closed, our "opportunities" are classes, and one of the fields is the instructor field - and that field changes fairly frequently after the sales person has sold the class, so changing the date each time it's updated would interfere with getting accurate sales reports. It's only if they're actually reopening or changing the status from won to lost after being sold that we need the close date updated.)

Thanks again (seriously, you need a bigger tip jar!)
Steve :-/Steve :-/
No problem, I guess for your type of a Business Process you do need to allow for "perpetual" Opportunities.
Adri SzopianAdri Szopian
I passed the challenge with: 

IF( 
IsClosed, 
CloseDate < TODAY(),
TRUE 
)

If the Opportunity has been CLOSED 
and the Closing Date is before TODAY (any previous date before today),
than the the statement becomes TRUE
and this will trigger the validation rule to fire,
and it won't allow to save the file.