Print this page

Workflow rule behaviour on Opportunity Stage History

Knowledge Article Number 000231609
Description Scenario:
 
Opportunity stage history records two entities whenever the stage is set to closed won / closed lost. If there is an active workflow rule.
 
Workflow Rule: Opportunity

1) A Workflow Rule can be created with the criteria:
     a) Evaluation Criteria must be set to created, and any time it’s edited to subsequently meet criteria
     b) Rule criteria: Opportunity: Stage equals Closed Won, Closed Lost.                    
2) The action would be a field update to Close Date field with a formula of: Today ( )
 
Explanation:
 
This article explains how the stage history records the entries if there is a workflow rule or a process builder activated. Below are the behavioral changes in opportunity stage history.
Resolution Workflow Rule behaviour on Opportunity Stage History

1) When we set past date as close date, the stage history will record two entities and the closed date will be changed to Today's date.
      a) Once the stage is changed to closed won / closed lost, the stage history records one entity with close date as past date.
     
      b) A stage history record the second entity with close date as today’s date is because of the active workflow rule.

 2) When we set future date as close date, the stage history will record only one entity and the closed date will be changed to today's date.
   
      a) Once the stage is changed to closed won, the stage history records only one entity with close date as today’s date.  

Reason: 
When you change an Opportunity to Closed Won and it has a close date in the future, the system automatically changes the close date to the current date before workflow rule trigger. Meaning when workflow rule trigger, the close date are already today's date; The Workflow does not change that value, so there is no entry recorded in stage history for the workflow rule changing that value.
 
Note:
 
If the future date is selected and stage is set to close lost, system will not automatically change the close date to current date that time workflow rule triggers and stage history will record two entities. One is closed lost with future date and other is closed lost with current date because of the workflow rule.



 




promote demote