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
Jesse MJesse M 

Formula Operator question

I want to create a formula that sends out a specific email alert after a case has been re-opened - I want it to go something like this.

ISPICKVAL([Case].Status, "Open"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),
OR
ISPICKVAL(PRIORVALUE([Case].Status), "Closed"),

But Im having trouble in the placements of OR and the relevant syntax. Can anyone help the proper format of the code above?

Thank you!
Best Answer chosen by Jesse M
Carolina W 2Carolina W 2

Hi, Jesse! So I think you want this:

 

AND(
ISPICKVAL([Case].Status, "Open"),
OR(
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Closed")
)
)

All Answers

PriyaPriya (Salesforce Developers) 
Hi Jesse,

Try this :- 
OR(
ISPICKVAL([Case].Status, "Open"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Closed")
)


If this work, kindly mark it as best answer.

Regards,

Priya Ranjan

Jesse MJesse M
Hi Priya,

Unfortunately, that doesn’t work as the email alert goes out whenever any of those statuses are changed.

Im looking for the email alert to go out when a case has gone to the open status, but only when it was one of the previous statuses listed in priorvalue. I appreciate your continued assistance.
 
Carolina W 2Carolina W 2

Hi, Jesse! So I think you want this:

 

AND(
ISPICKVAL([Case].Status, "Open"),
OR(
ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (CS Confirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Resolved (User Unconfirmed)"),

ISPICKVAL(PRIORVALUE([Case].Status), "Closed")
)
)
This was selected as the best answer