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
Durgamba RayuduDurgamba Rayudu 

Advance formulas trail head

I am doing this advanced formula trail head. creating validation rule. need to create validation rule. i kept like below on validation rule. testing working. but challenge saying failed. can somebody help
Create a validation rule formula that does not allow a user to mark a case as escalated unless the priority is set to 'High', the case was not Closed when Created, and the case isn’t closed.
AND(
  ISCHANGED( IsEscalated ),
  OR( 
     ISPICKVAL(PRIORVALUE( Status ), "Closed"), 
     NOT( ISPICKVAL(PRIORVALUE( Priority), 
          "High")), ( PRIORVALUE( IsClosedOnCreate ) = true)),
  (IsEscalated = true)
)
Best Answer chosen by Durgamba Rayudu
Khan AnasKhan Anas (Salesforce Developers) 
Hi Durgamba,

Greetings to you!

Please use below formula:
 
AND(
IsEscalated = TRUE,
OR(
  TEXT(Status) = 'Closed',
  IsClosedOnCreate = TRUE,
  TEXT(Priority) <> 'High'
  )
)

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Durgamba,

Greetings to you!

Please use below formula:
 
AND(
IsEscalated = TRUE,
OR(
  TEXT(Status) = 'Closed',
  IsClosedOnCreate = TRUE,
  TEXT(Priority) <> 'High'
  )
)

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Durgamba RayuduDurgamba Rayudu
thank u so much. it worked great.

Thanks
Durga