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
kjunkjun 

Validation Rule not stopping on error

Hello, Can someone tell me what I'm missing in the validation rule: 
AND(
ISPICKVAL( Status, 'Working - Contacted'),
ISPICKVAL( Rating, 'Hot')
)
I'm trying to not let users select save if the Status of Working - Contacted is selected and the picklist Rating field is not selected as Hot and try to save the record, the system should prompt them they will not be able to save this record. 

The other values in the picklist are: none, Cold, Warm. 

If the field is left blank, the user is still able to bypass but I'm trying to prevent that.

Thanks!
 
Best Answer chosen by kjun
Anthony McDougaldAnthony McDougald
Good Morning kjun,
Hope that your day is off to an amazing start. You did a fantastic job, you're only missing one piece of code. Please test the below and report back with your results. Hope this helps and may God bless you abundantly.
AND(
ISPICKVAL( Status, 'Working - Contacted'),
NOT(ISPICKVAL( Rating, 'Hot'))
)


Best Regards,
Anthony McDougald

All Answers

Anthony McDougaldAnthony McDougald
Good Morning kjun,
Hope that your day is off to an amazing start. You did a fantastic job, you're only missing one piece of code. Please test the below and report back with your results. Hope this helps and may God bless you abundantly.
AND(
ISPICKVAL( Status, 'Working - Contacted'),
NOT(ISPICKVAL( Rating, 'Hot'))
)


Best Regards,
Anthony McDougald
This was selected as the best answer
Soyab HussainSoyab Hussain
Hi kjun,
We have to use not function in the validation rule for restricting the user to restrict the same.
Use this Rule,  this will help you.
Validation Rule:
 
AND(
ISPICKVAL( Status, 'Working - Contacted'),
NOT( ISPICKVAL( Rating, 'Hot') )
)

If you found it useful please appreciate my efforts and mark it as the best answer.

LinkedIn:  https://www.linkedin.com/in/soyab-hussain-b380b1194/

Regards 
Soyab