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
Fotini CassioFotini Cassio 

How do I make a lookup field required when another field's picklist value is chosen?

I would like to create a validation rule that makes an Account lookup field required if a value is chosen from a picklist field. Specifically, in the Account object, when the "Reseller - Customer" option is chosen from the Type field, then the "Reseller" (account lookup) field becomes required to save the record. Here's a couple of validation rules that I've tried but neither of them works:

AND(
ISPICKVAL(Type, "Reseller - Customer"),
ISBLANK(Reseller__c)
)
_______________________________________________
AND(
ISPICKVAL(Type, "Reseller - Customer"),
Reseller__c = "")
 
Best Answer chosen by Fotini Cassio
BP SinghBP Singh
Please check:
1. Validation rule is active.
2. Please check the API Name of picklist value is same as you mentioned in validation rule.

Sharing a few screen shots below for further help:

Picklist Value

Validation Rule

Error Message Display

All Answers

Maharajan CMaharajan C
Hi Fotini,

Your formula looks good:

Try to check the picklist values spelling and Space,and also check the API name of the custom field.

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
BP SinghBP Singh
Please check:
1. Validation rule is active.
2. Please check the API Name of picklist value is same as you mentioned in validation rule.

Sharing a few screen shots below for further help:

Picklist Value

Validation Rule

Error Message Display
This was selected as the best answer
Fotini CassioFotini Cassio
Hi Raj, Thank you for trying to help me on this. I tried your suggestions and it still didn’t work? Any other ideas? Thanks, Fotini Cassio Sr. Business Systems Analyst & Administrator
Fotini CassioFotini Cassio
Thank you for your suggestions. I did confirm both but it still doesn’t work? Any other ideas? Fotini Cassio Sr. Business Systems Analyst & Administrator
BP SinghBP Singh
Fotini,

To analyze further, could you please share screen shots for below info:
1. Page with picklist and lookup fields where you edit and save
2. Lookup field detail page (where it describes field name, api name etc.)
3. Picklist value detail page (where it describes values, api names etc.)
4. Validation rule page