I want to create a workflow rule which should be triggered when I change the Lead Status value from 'Open: Not Contacted' to 'Open: Working'
Any help with this please?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
In the workflow rule you will want to set it to "created, and every time it's edited" in order to be able to use
PRIORVALUE() functions. Then you will be able to check if the Status was changed and if the
PRIORVALUE() meets your criteria and if the current value meets your criteria.
This help article here is a little different from what you are trying to do but gives an example of how to use
PRIORVALUE() with a picklist field.
If you need to add a field to the Opportunity Object to show the Stage an Opportunity had before it was changed to the current Stage you can do so by doing the following:
Note: you can use an Opportunity History report but this field allows you to just see the last Stage the Opportunity was in.
Once the Previous Stage is included on the Opportunity Object it can be used in Opportunity Reports.
For this workaround you will need to:
1) Create a new text field on the Opportunity Object called Previous Stage. (It can be hidden if needed)
2) Create a workflow rule that triggers a field update the Previous Stage field..
3) Add a Field update action with the formula specified below.
Login and go to: Your Name | Setup | App Setup | Customise | Opportunities | Fields Create a new Text field called "Previous Stage".
Go to: Your Name | Setup | App Setup | Create | Workflow & Approvals | Workflow Rules Click on New Rule and create a Workflow on Opportunities called "Previous Value".
Select "created, and every time it's edited" and enter the Formula Criteria:
- Save the Workflow Rule and add a field update called "Previous Stage Update". Select to update the "Previous Stage" field you created in Step 1 above. When prompted after selecting the field select "Use a formula to set the new value" Click on Show Formula Editor.
Paste in the following Formula:
IF( ISPICKVAL(PRIORVALUE(StageName),"Stage1"),"Stage1", IF( ISPICKVAL(PRIORVALUE(StageName),"Stage2"),"Stage2", IF( ISPICKVAL(PRIORVALUE(StageName),"Stage3"),"Stage3", IF( ISPICKVAL(PRIORVALUE(StageName),"Stage4"),"Stage4", ""))))
You will need to adjust the Formula above to include all of the Active Stages. Replace Stage1 with the first Stage listed and so on.
Add an additional ")" to the end of the Formula for each Stage added.
Then Save the Workflow Field Update.
Finally test the new field and check it is working by editing an Opportunity and changing the Stage.