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
janeisaacjaneisaac 

AND, OR, ISCHANGED, ISNEW, NOT and ISPICKVAL problem

I want to trigger an email alert just the first time that an opportunity changes to a certain stage.

It was working until people started created creating new opportunities AT that stage.

 

 

AND
( ISCHANGED( StageName ),
ISPICKVAL( StageName , "App sent to Underwriting"),
NOT(ISPICKVAL(PRIORVALUE(StageName),"App sent to Underwriting")))

 

 

 

So I added an ISNEW function into the rule which worked until I realized that it was sending them when ANY opportunity was created(ISNEW). I only want it to happen for Lending Opportunities. There are 2 different record types it could be - Consumer Loan or Commercial Loan.

 

 

AND
(OR ( ISNEW() ,( ISCHANGED( StageName )),
ISPICKVAL( StageName , "App sent to Underwriting"),
NOT(ISPICKVAL(PRIORVALUE(StageName),"App sent to Underwriting"))))

 

Can someone help me with this final criteria? Where do I put it?

 

Thanks,

Jane

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Wait a minute, I have it!!!

 

 

When a record is created, or when a record is edited and did not previously meet the rule criteria
ISPICKVAL( StageName , "App sent to Underwriting")

 

All Answers

Steve :-/Steve :-/

Hi Jane did my WFR not work for you? :-(

janeisaacjaneisaac

Hi Steve,

 

Thanks - no,it did not but then I found out another problem with the whole formula that I had not realized (the thing about the Record Types) so I posted it out here.

 

I know there is something tricky about the order in which you put some of the function statements and I am afraid to try and just go down a rathole.....

 

 

Steve :-/Steve :-/

Jeeeze...  first you dump me for David Schach and Tom Tobin, now you're going out and seeing other Salesforce Admins behind my back....  :-(

janeisaacjaneisaac

You know you're my go-to guy for formulas - I just dont want to take advantage of your good nature.....

Steve :-/Steve :-/

Wait a minute, I have it!!!

 

 

When a record is created, or when a record is edited and did not previously meet the rule criteria
ISPICKVAL( StageName , "App sent to Underwriting")

 

This was selected as the best answer
janeisaacjaneisaac

CAN YOU BELIEVE how simple it was - actually, I was able to use the  Criteria are Met version of the formula and just say Opportunity Stage equals Spp sent to underwriting.

 

Its Friday and I guess I was just overthinking it. Thanks my friend!