You need to sign in to do that
Don't have an account?
krishna 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.
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.
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
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.
(ISPICKVAL( Status , " IsEscalated ") &&
(ISPICKVAL(PRIORVALUE( Status ), "Closed") &&
(ISPICKVAL( Priority , "High"))))
- You want to use the "IsEscalated" field instead of a Status of "IsEscalated"
- You dont need PRIORVALUE in your function at all.
- 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.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
Hello All,
I successfully completed this challenge:
IF( IsEscalated , OR(IsClosedOnCreate ,
ISPICKVAL(Status, "Closed"),
ISPICKVAL(Priority, "Low"),
ISPICKVAL(Priority, "Medium")),
null)
Thanks,
Nida
IF(IsEscalated, AND(IsClosedOnCreate,
TEXT(Priority)!= "High",
ISPICKVAL(Status, "Closed")),
null)
IF( IsEscalated , OR(IsClosedOnCreate ,
ISPICKVAL(Status, "Closed"),
NOT ISPICKVAL(Priority, "High")),
null)
AND(
IsEscalated,
OR(
ISPICKVAL( Status , 'closed'),
IsClosedOnCreate,
!(ISPICKVAL( Priority , 'High'))
)
)
ISPICKVAL(Status, "Closed")||
NOT( ISPICKVAL( Priority , "High") )&&
IsEscalated
and(IsEscalated,
or(IsClosed,
and(IsClosedOnCreate),
TEXT(Priority)<>"High"))
This one is a direct translation of the requirement and worked too..
NOT( ISPICKVAL( Priority , "High") ) ||
ISPICKVAL(Status, "Closed")
&&
IsClosedOnCreate
( ISPICKVAL( Status , "escalated") && IsClosedOnCreate )
||
NOT( ISPICKVAL( Priority , "High") )
IF(ISPICKVAL( Status, "Closed") , true, false) ||
IF(NOT(ISPICKVAL( Priority , "High")) , true, false) ||
IF(IsClosedOnCreate, true, false)),
false)
(
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.
NOT (ISPICKVAL (Priority,"High"))&&
NOT(ISPICKVAL(Status, "Closed"))
What to do.??
I completed this challenge
IsEscalated = TRUE && (IsClosedOnCreate ||ISPICKVAL( Status ," Closed") || NOT(ISPICKVAL(Priority,"High")))
try it.
ISPICKVAL(Status, "Escalated"),
OR(IsClosedOnCreate, IsClosed ),
OR(
ISPICKVAL( Priority, "Medium" ),
ISPICKVAL( Priority, "LOW" )
)
)
AND(
IsEscalated=TRUE,
OR(
NOT(IsPICKVAL(Priority, "High")),
ISPICKVAL(Status,"Closed"),
IsClosedOnCreate=True
))
IF (
IsEscalated = true , AND (
!(IsClosed) , !(ISPICKVAL(Priority, 'High'))
) ,false
)
Error: Field IsEscalated does not exist. Check spelling.
Help! :)
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"))
AND( IsEscalated , OR( IsClosed , IsClosedOnCreate , NOT(ISPICKVAL( Priority ,"High")))
)
AND(IsEscalated = True,IsClosed = False,NOT(ISPICKVAL(Priority, "High")))
This worked for me
IF(
NOT(IsClosed) && NOT(ISPICKVAL(Priority,"high")),
true ,
false)
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!
IF( ISPICKVAL( Status, "Escalated") ,
OR( IsClosed , IsClosedOnCreate ),
NOT(ISPICKVAL( Priority, "High"))
)
Cheers,
Patricia
IF( IsEscalated , // this checks for the escalation and this field is created by us
OR(ISPICKVAL( Status , 'Closed'), //prior status shouldn't be Closed if we are trying to escalate - we cannot escalate the closed cases
ISPICKVAL( Priority , 'Low'), // we dont want the Low or Medium priority cases to be escalated
ISPICKVAL( Priority , 'Medium'), // we are only interested in escalating the High priority cases
IsClosedOnCreate // This field is already existing in the system
), null
)
IF( IsEscalated , OR( IsClosed , IsClosedOnCreate , NOT( ISPICKVAL( Priority , "High" ) ) ) , null )
Isblank ('escalated') = False && Text(Status) = 'Closed' ||
Text(Priority) <> 'High' ||
IsClosedOnCreate = True
#1 - note that last or condition, cannot set status to Escalated if Priority is not High, but this failed the tests
AND
(ISPICKVAL(Status, "Escalated"),
IsClosed
)
|| (AND
(ISPICKVAL(Status, "Escalated"),
IsClosedOnCreate )
)
|| (AND
(ISPICKVAL(Status, "Escalated"),
(!(text(Priority) = "High")))
)
#2 - this is the correct one
AND
(ISPICKVAL(Status, "Escalated"),
IsClosed
)
|| (AND
(ISPICKVAL(Status, "Escalated"),
IsClosedOnCreate )
)
|| (!(text(Priority) = "High"))
(IsEscalated)&&
(IsClosedOnCreate) ||
NOT(ISPICKVAL(Priority, "High")) ||
(ISPICKVAL(Status, "Closed"))
(ISPICKVAL(Status, "escalated") && ISPICKVAL(PRIORVALUE( Status ), "Closed")) || NOT( ISPICKVAL(Priority, "High"))
ISPICKVAL(Status,"Closed") &&
ISPICKVAL(Status,"Closed When Created")
|| NOT(ISPICKVAL(Priority,"High"))
IF( IsEscalated ,
IF(NOT(ISPICKVAL(Status,"Closed")) && ISPICKVAL(Priority, "High"),
false,true),
false
)
Create a Validation Rule That Uses Picklist Values
Create a validation rule that allows a user to escalate a case only when it meets certain requirements.
Create a validation rule:
Object: Case
Name: Mark_as_Escalated
Make the validation rule fire when someone tries to escalate a case and one or more of these conditions exist:
The case status is "Closed"
Priority is not High
Error Message: You can only set a case as escalated if it is high priority and not closed (we won't check this)
Error Location: Under the Escalated field (we won't check this)
Add the Escalated field to the Case Layout page layout
We tried to escalate a high priority case but couldn’t save the record. Check the logic in your validation rule’s formula.
got it, you have to go to Case Page Layouts > Case Layout > drag Escalete and save
Page layout: Case Page Layouts > Case Layout > drag Escalete and save or quick save
Ended up with the same one liner as Mathias:
Page layout: Case Page Layouts > Case Layout > drag Escalete and save or quick save
I just wrote a simple Validation Formula and passed the challenge:
ISPICKVAL( Status , "Closed") || (ISPICKVAL( Priority , "Medium") || ISPICKVAL( Priority , "Low") )
And for Page layout navigate to: Case Page Layouts > Case Layout, then drag Escalete and save(as shown in attached picture)
IsEscalated && ( NOT(ISPICKVAL(Priority, 'High')) || BEGINS(TEXT(Status),'Closed'))
I just wrote a simple Validation Formula and passed the challenge:
NOT(AND(IsEscalated,
NOT(ISPICKVAL(Status, "Closed")),
ISPICKVAL(Priority,"High" )))