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
Jaye LoweJaye Lowe 

first time stage change formula

I have Date/Time Field that I need to update the first time an Opportunity stage changes and only the first time. Any idea how to accomplish this? Thanks, 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Jaye,

I would suggest to create an another formula field(where we track how may times the status is changed) which will increase the count if the status is changed and  based on the above field update the Date/Time field.

If this solution helps, Please mark it as best answer.

Thanks,
 
Jaye LoweJaye Lowe
Sai, thanks for the advice, but how would you suggest I set up the formula field to count the stage changes? 
Forum TeamForum Team
Hi Jaye, 

We have multiple ways to achieve this functionality.
-By using Trigger.
-Workflow rule
-Process builder
But the best way of doing it is a workflow rule as we always prefer Declarative solution.

In your Workflow Rule, set the criteria so the Field Update only happens if the field is blank. When we populate some data in field one time it will not be empty again and criteria will not be met whenever the opportunity stage changes.

Reference:
https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A82zZSAR