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
Mike @ G2Mike @ G2 

Case Description Validation Rule

Hi,

 

I m trying to implement a new validation rule that will throw an error message when my agents categorise the case as 3 options and enter the case description as "see chat" only, the best attempt at the formula i ve had until now is below, but i keep getting a syntax error, can anybody help?

 

Formula:

 

ISPICKVAL (Query_Type__c , "suggestion"  ||  "complaint"  ||  "threat" ) && (Description, "see chat")

 

 

Error Message:

Error: Syntax error. Missing ')'

 

The cursor jumps to right after the word Description when i click check syntax.


Thanks,

M

Best Answer chosen by Admin (Salesforce Developers) 
Mike @ G2Mike @ G2

i found what i was looking for:

 

OR( 
ISPICKVAL (Query_Type__c , "suggestion"), 
ISPICKVAL (Query_Type__c , "complaint"), 
ISPICKVAL (Query_Type__c , "threat")) 

&& 

OR( 
Description = "see chat", 
Description = "see chat.")

 

thanks anyways !

All Answers

Steve :-/Steve :-/

Try this one

 

AND(
Description = "see chat",
OR(
ISPICKVAL(Query_Type__c , "suggestion"),
ISPICKVAL(Query_Type__c , "complaint"),
ISPICKVAL(Query_Type__c , "threat")))

 

 

Mike @ G2Mike @ G2

i found what i was looking for:

 

OR( 
ISPICKVAL (Query_Type__c , "suggestion"), 
ISPICKVAL (Query_Type__c , "complaint"), 
ISPICKVAL (Query_Type__c , "threat")) 

&& 

OR( 
Description = "see chat", 
Description = "see chat.")

 

thanks anyways !

This was selected as the best answer
Steve :-/Steve :-/

why didn't I think of that   :-/