+ Start a Discussion
krishna chaitanya 35krishna chaitanya 35 

Create a validation rule for escalated cases.

The validation rule should be on the Case object.
The validation rule should be named 'Mark_as_Escalated'.
The validation rule should fire if someone tries to set a case as escalated and it is closed, closed when created, or does not have a priority of High.
The validation rule should display the error message 'You can only set a case as escalated if it is high priority and not closed' under the Escalated field when triggered.
Add the 'Escalated' field to the Case page layout.
Best Answer chosen by krishna chaitanya 35
Nida Khan 5Nida Khan 5

Hello All,
I successfully completed this challenge:

IF( IsEscalated , OR(IsClosedOnCreate , 
ISPICKVAL(Status, "Closed"), 
ISPICKVAL(Priority, "Low"), 
ISPICKVAL(Priority, "Medium")), 
null)

Thanks,
Nida

 

All Answers

James LoghryJames Loghry
Hi Krishna,

It looks like you're trying to get someone to solve a Trailhead challenge for you.  Instead, try re-reading and following the instructions that are part of the Trailhead challenge. If you run into any errors and have trouble solving the errors, then feel free to come back and ask for help.

Thank you.
erin ryan 8erin ryan 8
I'm having the same struggle. What am I doing wrong? Thanks
(ISPICKVAL( Status , " IsEscalated ") && 
(ISPICKVAL(PRIORVALUE( Status ), "Closed") && 
(ISPICKVAL( Priority , "High"))))
James LoghryJames Loghry
Erin:
  1. You want to use the "IsEscalated" field instead of a Status of "IsEscalated"
  2. You dont need PRIORVALUE in your function at all.
  3. The formula should check that the Case  (IS ESCALALTED AND (The case IsClosedOnCreate OR the Priority is *NOT* High OR the Status is Closed
Granted step 3 is full of hints, so it's up to you to put that in a formula form.  Keep in mind that this is an ADVANCED formula challenge.
erin ryan 8erin ryan 8
Thanks anyway , but I'm just not getting this rule. Most of the time  I learn by seeing what works and  evaluating why it works. Trailhead should have a capitulation button. I'd be willing to forfeit the points and get back to work. 
Liss Formentin 8Liss Formentin 8

James- appreciate the response on this thread. I'm getting a little hung up on this one and hoping for some guidance. Any pointers?

CASE  (IsEscalated,
 (AND
  (OR
    (IsClosedOnCreate,
     IsClosed,
     ISPICKVAL(Priority, "Low"),
     ISPICKVAL(Priority, "Medium"))
  )
 )
)

Error: Incorrect number of parameters for function 'CASE()'. Expected 2, received 2

Nida Khan 5Nida Khan 5

Hello All,
I successfully completed this challenge:

IF( IsEscalated , OR(IsClosedOnCreate , 
ISPICKVAL(Status, "Closed"), 
ISPICKVAL(Priority, "Low"), 
ISPICKVAL(Priority, "Medium")), 
null)

Thanks,
Nida

 

This was selected as the best answer
Chalice Nead 3Chalice Nead 3
This one took some thought! This is the simplest method I came up with- following James' not-so-subtle hinting.

IF(IsEscalated, AND(IsClosedOnCreate, 
     TEXT(Priority)!= "High",
     ISPICKVAL(Status, "Closed")),
     null)
 
Jens Vanden MeersschautJens Vanden Meersschaut
This is what I came up with. 
 
IF(
     IsEscalated, 
     OR(
            BEGINS(TEXT(Status), "Closed"), 
            NOT(ISPICKVAL (Priority, "High"))
           ), 
     null 
    )

 
Darrell GallegosDarrell Gallegos
Question. After completing this Module in the TrailHead; however, not I can not change the status from Escalated not close the case. What are I missing? Thanks.
ashley brownashley brown
Heres what we got and it worked

IF( IsEscalated , OR(IsClosedOnCreate ,
ISPICKVAL(Status, "Closed"),
NOT ISPICKVAL(Priority, "High")),
null)
Andreas GerogiannisAndreas Gerogiannis
BTW This one works too

AND(
  IsEscalated,
  OR( 
    ISPICKVAL( Status , 'closed'),
    IsClosedOnCreate,
    !(ISPICKVAL( Priority , 'High'))
  )
)
Niyanthri Lokesh 2Niyanthri Lokesh 2
This one worked for me
ISPICKVAL(Status, "Closed")|| 
NOT( ISPICKVAL( Priority , "High") )&& 
IsEscalated
Kris RyanKris Ryan
This one worked for me:

and(IsEscalated,
  or(IsClosed,
      and(IsClosedOnCreate),
      TEXT(Priority)<>"High"))
sangeethsangeeth
Hi, 
This one is a direct translation of the requirement and worked too..

NOT( ISPICKVAL( Priority , "High") ) ||
ISPICKVAL(Status, "Closed") 
&& 
 IsClosedOnCreate
chinochino
this also worked.

( ISPICKVAL( Status , "escalated") && IsClosedOnCreate ) 
|| 
NOT( ISPICKVAL( Priority , "High") )
Abhishek Mishra 92Abhishek Mishra 92
IF( IsEscalated = true, ( 
                                      IF(ISPICKVAL( Status, "Closed") , true, false) || 
                                      IF(NOT(ISPICKVAL( Priority , "High")) , true, false) || 
                                      IF(IsClosedOnCreate, true, false)), 
false)
Pavlo ShchurPavlo Shchur
Hi, this is an another option.
IsEscalated = true && ISPICKVAL( Status, "Closed")
||
NOT(ISPICKVAL(Priority , "High"))
||
IsClosedOnCreate
Daryle SinghDaryle Singh
IF
(
IsEscalated=true,

OR(IsClosed ,IsClosedOnCreate,NOT ISPICKVAL(Priority , 'High')),

null
)

is the solution


This reads as: 
If the record is to be escalated (IsEscalated=true) then check the following OR statement.

The OR statement will return true 
if IsClosed=true or if IsClosedOnCreate = true or
if ISPICKVAL(Priority , 'High') evaluates to false.

It will evaluate to false if Priority is not equal to 'High'
then u negate it to make it true.
So its true that Priority is not equal to 'High'

If the OR statement evaluates to true then it will fire the validation rule which will then display the error message.
 
Carmen Nixon 5Carmen Nixon 5
IsEscalated=True &&
NOT (ISPICKVAL (Priority,"High"))&&
NOT(ISPICKVAL(Status, "Closed"))
sachin saini 26sachin saini 26
The validation rule name 'Mark_as_Escalated' was not found.

What to do.??
Andrei MilitaruAndrei Militaru
@Sachin, are you creating the validation rule directly from the default Escalated field on the Case Object? ( Setup -> Object Manager -> Case -> Fields & Relationships -> Escalated -> Hit NEW under Validation Rules )  If you are, pay attention to the name, you might be missing something.
Vikash Kumar MandalVikash Kumar Mandal
Hello all 
I completed this challenge
IsEscalated = TRUE && (IsClosedOnCreate ||ISPICKVAL( Status ," Closed")  || NOT(ISPICKVAL(Priority,"High")))
try it.
Pankaj ShakyaPankaj Shakya
IF(
ISPICKVAL(Status, "Escalated"),  
OR(IsClosedOnCreate,  IsClosed ),
OR(
      ISPICKVAL( Priority, "Medium" ),
      ISPICKVAL( Priority, "LOW" )
      )
)
SIVANANDAN PSIVANANDAN P
IF( IsEscalated , AND( NOT(IsClosed) , NOT( ISPICKVAL(Priority, 'High'))),false)
This one worked for me well
 
Armando Psalms AzurinArmando Psalms Azurin
This one worked for me:
(IsEscalated && IsClosed) || (IsClosed && CreatedDate = DATETIMEVALUE(TODAY())) || NOT( ISPICKVAL(Priority, "High"))
Rizwan Ali 8Rizwan Ali 8
This is work for me:

AND(
   IsEscalated=TRUE,

OR(
   NOT(IsPICKVAL(Priority, "High")),
   ISPICKVAL(Status,"Closed"),
   IsClosedOnCreate=True
))
Pedro RodriguesPedro Rodrigues
I used:

IF (
  IsEscalated = true , AND (
    !(IsClosed) , !(ISPICKVAL(Priority, 'High'))
  ) ,false
)
David GranadosDavid Granados
I keep getting this error message:
Error: Field IsEscalated does not exist. Check spelling.

Help! :)
Sebastian Diaz 5Sebastian Diaz 5
Hey guys!
The issue here is realated to the fact that the isntructions are not clear enough.

Meaning: 

The error message you are supossed to show, specifically states: "You can only set a case as escalated if it is high priority AND not closed"
This lead to an error as you assume that both things must happen for the rule to work.

Now, if you look to the prior statement: "The validation rule should fire if someone tries to set a case as escalated and it is closed, closed when created, OR does not have a priority of High."

So, on my first try, I ended up following the message statement, with:

IsEscalated &&
BEGINS(TEXT(Status),"Closed") &&
NOT(ISPICKVAL(Priority, "High"))

And based on the confusion, I tried changing the logic to OR, and puffff! working.

IsEscalated &&
BEGINS(TEXT(Status),"Closed") ||
NOT(ISPICKVAL(Priority, "High"))
Bee_2018Bee_2018
This one works for me : 

AND( IsEscalated , OR( IsClosed ,  IsClosedOnCreate , NOT(ISPICKVAL( Priority ,"High")))
)

 
Bharath Kumar 305Bharath Kumar 305
And this one worked for me :-)
AND(IsEscalated = True,IsClosed = False,NOT(ISPICKVAL(Priority, "High")))
Krishna ShahiKrishna Shahi
Easiest explaination
This worked for me

IF(
    NOT(IsClosed) && NOT(ISPICKVAL(Priority,"high")),
    true ,
    false)
Dharmavaram SaikumarDharmavaram Saikumar
I tried this and completed the challenge.

IF(AND( IsEscalated =True, IsClosed = True),
IsClosedOnCreate =True,NOT( ISPICKVAL( Priority , "High") ))

Please Let me know if the above validation rule is made your challenge to be completed.
Thank you!
Patricia Almeida dos SantosPatricia Almeida dos Santos
This is how I completed the challenge.  I hope this helps :)  

IF( ISPICKVAL( Status, "Escalated") , 
     OR( IsClosed , IsClosedOnCreate ),  
     NOT(ISPICKVAL( Priority, "High")) 
 )

Cheers,
Patricia
Rucha MM 9Rucha MM 9
IF( IsEscalated , IsClosed   || ISPICKVAL( Status ,"Closed")   ||   NOT(ISPICKVAL( Priority , "High"))   , null)