+ Start a Discussion
rumdumdumrumdumdum 

Lookup Problem

Hi All,

 

Trying to create a validation rule for tasks.

 

I have a picklist field called Type that has multiple values and another field called Name that is a lookup for accounts. 

 

The rules is for users when they select Type picklist value "Sales Meeting Call", Name has to be filled with a lookup.

 

But when I'm creating the rule, in the Insert Field option the lookup field is not visible?

 

Thanks,

Richard 

Best Answer chosen by Admin (Salesforce Developers) 
shillyershillyer

Hi Richard,

 

This should work. Let's say you have 2 objects: ObjectA and ObjectB, where ObjectA has the Type field and a lookup field to ObjectB. With that, this should be the formula in the validation rule on ObjectA:

 

IF( ISPICKVAL( Type__c , "Sales Meeting Call") , ObjectB__c = "", ObjectB__c <> "")

 

Hope that helps,

Sati