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
Fingerroll23Fingerroll23 

Email notification when opportunity stage field changes

Looking for a little help here after trying to self help myself has failed. I am looking for a way to have an email notification sent out automatically to designated individuals when the stage of an opportunity changes. We have Bid Managers who want to be automatically notified when the stage of an opportunity is changed by an Account Manager. Are there any quick fixes?
JakesterJakester

Totally, as long as you have Enterprise or higher edition. Just make a workflow rule on the Opportunity with a trigger something like

Code:
ischanged(Stage)

 
I'm not quite clear if you only want it to work when an Account Manager changes it. If so, then it's something like
 
Code:
and(
     ischanged(Stage)
    ,$Profile.Name <> "Account Manager" 
)

 
Then create an email that goes out when the workflow fires.
Fingerroll23Fingerroll23
Perfect. Thanks Jakester! Don't have much experience with building workflows, but you have pointed me in the right direction. I'll give it a whirl!
Sunshine2Sunshine2
I have a similar situation with Case stage changes however I only want the notification to go to certain persons when a case moves from certain stages.  For example, the QA manager only wants to know if someone moves a case out of the QA queue but he doesn't want to be notified if a case is moved on from some other queue status.  Any suggestions?
TCAdminTCAdmin
Hello Sunshine2,

You will need to utilize the PRIORVALUE() function in the workflow rule. If the

AND(
  NOT(ISNEW()),
  PRIORVALUE(OwnerId) = 'XXXXXXXXXXXXXXX',
  OwnerId <> 'XXXXXXXXXXXXXXX'
)

This workflow rule should trigger if a user takes a case out of the QA Queue. If you want to utilize it with the Stage you will need to utilize the ISPICKVAL() with the PRIORVALUE() function.
Sunshine2Sunshine2

 

Thanks for your reply and yes I am more concerned about when the QA stage changes.  I had already tried as below but kept getting error messages that you can't use PriorValue in this circumstance. 

AND ( 

ISCHANGED(  Status ) ,

   OR ( 

         ISPICKVAL( PRIORVALUE ( Status ) , "03- In QA" ),

         ISPICKVAL ( PRIORVALUE (Status ), "08- In QA for Testing on Production" )),

  $User.Id  <> "00000000000xxxx"

TCAdminTCAdmin
Sunshine2,

This is the reason I place the ISNEW() function within the workflow. If it is a new record the prior value function will not work. You have to build in a test that will prevent it from using the prior value function during the creation of the record. The ISNEW() function will return a true if the record is created at that save.
Sunshine2Sunshine2
Thanks for the explanation and the help!   I'll try it. 
Sunshine2Sunshine2
AND ( 
   NOT(ISNEW()),
   ISCHANGED( Status ) ,
   OR ( 
         ISPICKVAL( PRIORVALUE ( Status ) , "03- In QA" ),
         ISPICKVAL ( PRIORVALUE (Status ), "08- In QA for Testing on Production" )),
  $User.Id  <> OwnerId
)
 
This is what I tried but it gives me an error message "Function ISNEW may not be used in this type of formula".  Any ideas?  Forgive me but I am not a developer by trade so this is not my area of expertise.  Thanks for your help!
TCAdminTCAdmin
Sunshine2,

You will need to utilize Evaluation Criteria to "Every time a record is created or edited". You will not be able to use it with the first or second Evaluation Criteria.