+ Start a Discussion
Michael Webb 5Michael Webb 5 

Need help with a validation rule(s)

I am not sure how to write this, however, I need a validation rule that does not allow a user to save the record.

Here are the feilds and the criteria I am not sure how to start, the first two are picklists the third is a T/F checkbox, fourth is a date.


If 1st attempt and 2nd attempt are set to no and customer returned call is set to false then the date customer reached HAS to be empty.  And in another set of circumstances if the date customer reached and all three of the fields above are blank they need to choose when they reached the customer.  It is a bit confusing so I am not sure where to start.  Thank you very much in advance for any suggestions.  I can do basic validation rules just the multiple options I am not sure how to write.
Balaji Chowdary GarapatiBalaji Chowdary Garapati
Hello Micheal,

   If you are looking for same error message in both the criteria's you mentioned you can have one validation rule or you might need two validation rules:.

The formula would be some thing like:
ISPICKVAL(X1st_Customer_Attempt__c,'NO') && ISPICKVAL(X2nd_Customer_Attempt__c,'NO') && NOT(Customer_Returned_Call__c) && !ISBlank(Date_Customer_Reached__c) ,

ISBlank(text(X1st_Customer_Attempt__c)) && ISBlank(text(X2nd_Customer_Attempt__c)) && NOT(Customer_Returned_Call__c) && ISBlank(Date_Customer_Reached__c) )
If you would like to have two different validation rules with different mesasges you can split the above formula.

Hope it helps.,