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
Terry CostaTerry Costa 

Error Condition Formula on Custom UserName Field

Hi,
I created a custom field in Opportunity called Pre-sales. 
Data Type is Lookup. Using this field, sales people can look up users in sfcom and assign them as
a pre-sales person to this opportunity. 
However, I want to restrict the user names they can pick from to say, "John Smith".
I tried the following Error Condition Formulas, none of them work:
Pre_Sales__c = "John Smith"
Pre_Sales__c.FirstName = "John"
CONTAINS(Pre_Sales__c,"John Smith")
CONTAINS("John Smith",Pre_Sales__c)
Can someone please help?
To complicate a little, how adding a second name "Jane Dowe".
Thanks,
- Terry
 
Wahid BuhariWahid Buhari
@Terry
try using "Pre_Sales__r.Name" in your formula. Relationship fields should append with __r instead of __c