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
ErikaMErikaM 

Please Help! Opportunity Close Date Code

Hi there everyone!

I need some help constructing a formula for my "Close Date' field on my opportunities. It seems like a fairly simple concept, however I can not wrap my brain around the right function!

Here is what I would like to do...

If the "Close Date" is changed to "Closed Won" than the value should equal "Today"
If the "Close Date" is changed to "Closed  Lost" than the value should equal "Today"
If the "Close Date" is changed to "Closed Terminated" than the value should equal "Today"
If the stage is not new, or any other stage than the value should not change.

Does anyone have a suggestion for me?

Thanks!

kkr.devkkr.dev

try this.

 

IF(OR(StageName =='Closed Won',StageName =='Closed  Lost',StageName =='Closed Terminated') , CloseDate = TODAY(),  )