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
nitin sharma 190nitin sharma 190 

Workflow on an opp object

Hi Everybody,

An opp object has stage field.As per my requirement if opporutnity stage field has not been changed for the last 20 days then I would like to inform an opporunity owner by sending him an email.

I am trying to use workflow.I want to capture the number of days an opp has stayed in a particular stage and if the number of days is equal to 20 days then workflow will send an email to the opp owner.

If i can capture the last time an opportunity stage has been changed in a field that would be nice.However,I am not able to do that ,Can somebody please help.


 
Pun!5h3rPun!5h3r
Hello Nitin,

1) First of all create a Custom field (lastModifiedDate) which is of Date DataType.
2) Then create a workflow on Opportunity, set the condition Formula "isChanged(stageName)" , update field lastModifiedDate = Today()
3) Create Another workflow on Opportunity, set the condtition Formula "Today - lastModifiedDate >= 20", send mail to required recepient
4) activate both the workflow.

Let me Know about final solution

Thanks and Regards
nitin sharma 190nitin sharma 190
Hi Pun,

I tried doing what you askedme to do.However,I got below given error when I tried creting formula using Function.
isChanged(stageName)


Function ISCHANGED may not be used in this type of formula

It looks like ischanged does not work with picklist.


Any suggestions?
 
Pun!5h3rPun!5h3r
User-added image
Pun!5h3rPun!5h3r
so u were not able to create workflow??
Dhanya NDhanya N
Hi Nitin,

isChanged(stageName) will work when the Evaluation criteria is 'created, and every time it's edited'. So change it to 'created, and every time it's edited'.

Thanks,
Dhanya