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
balakrishna mandula 8balakrishna mandula 8 

Implement a validation rule that makes the "yes" only selectable if the status is "Published".

Hi,
 I am trying to imlement validation rule on one check box field say "Yes" that will only be selectable if another field say "Status" is "Published"
Please help me on this

Thanks in advance

 
Narsimulu ChiranjiNarsimulu Chiranji
You can't set checkbox as dependent value while keeping picklist value as controlling field . check box must be controlling field . for your reference check this link out 
https://help.salesforce.com/HTViewHelpDoc?id=fields_dependent_field_considerations.htm&language=en_US
balakrishna mandula 8balakrishna mandula 8
Can we achieve this by Javascript or any other way? This is standard userface page not vf page.
Narsimulu ChiranjiNarsimulu Chiranji

You need to use picklists instead of checkboxes. Your picklist can be Yes/No. You can then use dependent fields to handle this.
James WooleyJames Wooley
AND(
    not(ispickval(status, 'Published')),
    checkbox = true
)

where checkbox needs to be replaced with the name of your checkbox field. This means an error will occur if the checkbox is set to true for any status other than published.