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
OIOI 

Create task if Opportunity remains in same stage

Hi All,

    I need to create an activity if an Opportunity remains in same stage for more than 30 days. Using Workflow first criteria, whenever the Opportunity changes the stage, I calculate its date. I have 5 stages in Opportunity and I have 5 custom date fields for each stage. I have created a formula field "Stage duration > 30 days" which checks for each stage date against today and sets the flag to "Y" or "N"

e.g.   IF(AND(ISPICKVAL(StageName,"Negotiation" ),TODAY()-Negotiation_Date__c >30),"Y",IF(AND(ISPICKVAL(StageName,"Approaching" ),TODAY() - Approaching_Date__c > 30,"Y",...)

To create a task if the Opportunity remains in the same stage for 30 days, I created a workflow with the first criteria "When a record is created, or when a record is edited and did not previously meet the rule criteria", I gave the rule criteria as IF( Flag_for_Stage_Duration__c ="Y",True,False) and in the time dependent workflow actions, I created a task to be assigned to Opportunity owner. I need this workflow to create a task whenever the Opportunity remains in the same stage for more than 30 days even though the record is not edited in between. I tested this giving the date difference(Opportunity in same stage) as 1 day instead of 30 days. What happens is when a record is created and if the stage is not modified, the workflow is not getting fired. But when the stage is changed, then a task is getting created. Any guidance or help is very much appreciated.

 

Thanks,

Sue

Message Edited by OI on 02-25-2009 01:30 AM
Message Edited by OI on 02-25-2009 01:31 AM