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
KCarmenKCarmen 

Validation Rule Help!

Hi all - I need to change my validation rule and having a time of it. I need the Number_of_Contacts_Roles_Assigned__c to be = 0 (not BLANK) in order display the error message + if someone choose any of the stages below with no contact role, the error will show.

So if there are zero contact roles on the opp and any of the stages in the validation rule below are chosen the error will show.
I already have the trigger and fields for this, just need to get my validation rule right. HELP!!!! This should be so easy! Maybe my brain is too fried.

AND 

ISBLANK(Number_of_Contacts_Roles_Assigned__c), 
AND(OR(ISPICKVAL(StageName,'Value Proposition'),ISPICKVAL(StageName,'Proposal/Price Quote'),ISPICKVAL(StageName,'Negotiation/Review'), ISPICKVAL(StageName ,'Closed Won'),ISPICKVAL(StageName ,'Closed Lost'))))
Best Answer chosen by KCarmen
Maharajan CMaharajan C
Hi KC,

There is some small changes in your formula. 

AND 

OR(ISBLANK(Number_of_Contacts_Roles_Assigned__c),Number_of_Contacts_Roles_Assigned__c=0), 
OR(ISPICKVAL(StageName,'Value Proposition'),ISPICKVAL(StageName,'Proposal/Price Quote'),ISPICKVAL(StageName,'Negotiation/Review'), ISPICKVAL(StageName ,'Closed Won'),ISPICKVAL(StageName ,'Closed Lost')))

Can you please Let me know if it works or not!!!

If it helps don't forget to mark this as a best answer!!!

Thanks,
​Raj

All Answers

Maharajan CMaharajan C
Hi KC,

There is some small changes in your formula. 

AND 

OR(ISBLANK(Number_of_Contacts_Roles_Assigned__c),Number_of_Contacts_Roles_Assigned__c=0), 
OR(ISPICKVAL(StageName,'Value Proposition'),ISPICKVAL(StageName,'Proposal/Price Quote'),ISPICKVAL(StageName,'Negotiation/Review'), ISPICKVAL(StageName ,'Closed Won'),ISPICKVAL(StageName ,'Closed Lost')))

Can you please Let me know if it works or not!!!

If it helps don't forget to mark this as a best answer!!!

Thanks,
​Raj
This was selected as the best answer
KCarmenKCarmen
Thank you Maharajan!