0

I have users searching for values in a Lookup field in Salesforce on a Custom Object. When these users select 8 specific values (out of the long list) I want to have a subsequent picklist (File_Type__c) required to be populated with a value.

The validation rule I have created below is not working. What am I missing here?

AND(    
Primary_Application__c = "B2B - Supply Chain - 3PLs",     
Primary_Application__c = "B2B - Banks - JP Morgan Chase",     
Primary_Application__c = "B2B - Banks - Wells Fargo",     
Primary_Application__c = "B2B - Banks - Bank of America",     
Primary_Application__c = "B2B - Banks - Other",   
Primary_Application__c = "B2B - Banks - SVB",     
Primary_Application__c = "B2B - Supply Chain - Retailers",    
Primary_Application__c = "B2B - Supply Chain - Suppliers",    
(ISPICKVAL(File_Type__c," ")) 
)

1 Answer 1

0

Lookup fields don't have a string value like "B2B - Banks - Other"; their literal content is the Salesforce Ids of the objects to which they're linked. You can access values on the other side of the relationship, on the linked-to object, with relationship notation:

Primary_Application__r.Name = "B2B - Supply Chain - 3PLs",

I'm assuming that the value you want lives in the Name field on the object you're looking up to; if not, adjust the above to use the API name of the relevant field.

1
  • Ahhh! yes! Slipped my mind! Thank you -- great suggestion Aug 15, 2018 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.