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
Ryan Mastbergen 4Ryan Mastbergen 4 

Validation Rule Not Working as Expected suggestions?

Hello,

I am stuck on a validation rule -

If Sub Category is either 'Attestation Form Complete' or 'Attestation Form Incomeplete', all the other fields listed must not be blank.

The current formula will not let me create the record even if all the fields listed are completed.  Any suggestions would be helpful.
 

Thanks!
User-added image

Best Answer chosen by Ryan Mastbergen 4
Maharajan CMaharajan C
Hi Ryan,

There is a problem in your formula:

Please try the below one:
 
AND(OR(
ISPICKVAL(Sub_Category__c,"Attestation Form Complete"),
ISPICKVAL(Sub_Category__c,"Attestation Form InComplete")
),
OR(
ISPICKVAL(Creditable_Coverage__c,""),
ISBLANK(Start_Date__c),
ISBLANK(End_Date__c),
ISPICKVAL(Type_of_Coverage__c,""),
ISPICKVAL(Relationship_to_Member__c,""),
ISPICKVAL(Verbal_Permission_Obtained__c,"")
))

Thanks,
Maharajan.C

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Ryan,

Greetings!

Have you tried by enabling the debug logs to see,if the validation rule criteria is met.

Reference:https://help.salesforce.com/apex/HTViewHelpDoc?id=code_add_users_debug_log.htm&language=en_us

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
kamala swarnalathakamala swarnalatha
Hi Ryan,

Could you please change the formula like this and test it?

AND(OR(ISPICKVAL(Sub_Category__c,"Attestation Form Complete),ISPICKVAL(Sub_Category__c,"Attestation Form InComplete)),AND(......))

Hope this helps!

Please let me know if you have further questions.

Thanks,
K.Kamala
Sweet Potato Tec.

 
Maharajan CMaharajan C
Hi Ryan,

There is a problem in your formula:

Please try the below one:
 
AND(OR(
ISPICKVAL(Sub_Category__c,"Attestation Form Complete"),
ISPICKVAL(Sub_Category__c,"Attestation Form InComplete")
),
OR(
ISPICKVAL(Creditable_Coverage__c,""),
ISBLANK(Start_Date__c),
ISBLANK(End_Date__c),
ISPICKVAL(Type_of_Coverage__c,""),
ISPICKVAL(Relationship_to_Member__c,""),
ISPICKVAL(Verbal_Permission_Obtained__c,"")
))

Thanks,
Maharajan.C
This was selected as the best answer
Ryan Mastbergen 4Ryan Mastbergen 4
Thank you so much Maharajan, that works excellent!

Really appreciate it!

Ryan
fas asawsfas asaws
I want the same feature for my website of online Furniture store. You can see here the website detail (https://tcl365.ie/).
Prakash MisharaPrakash Mishara
Thanks for the update. It really works like a magic. Keep sharing such tips and help developers. Check out some of the best Sports Streaming Websites (https://sharphunt.com/sports-streaming-sites/). 
alex sunnyalex sunny
thanks my issue has been fixed.

https://topdatingwebsitesx.com/omegle
https://topdatingwebsitesx.com/bazoocam
https://chatrandom.live
Anil Kumar 1475Anil Kumar 1475
Hello I love creating tools so I created this tool. We all always want to do some creativity on social media websites, l so just to make it possible  https://fancycrazytext.com/ (https://fancycrazytext.com/)you can use some custom fonts which are not available on social sites.
https://howoldagecalculator.com
 
Mosh HamedaniMosh Hamedani
Essay Writing Services is a US based writing company that provides thousands of free essays to the students all over the World. If you want your essay written by a highly professional writers, then you are in a right place. We have hundreds of highly skilled writers working 24/7 to provide quality content writing services to the students all over the World.