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
lee_carter73lee_carter73 

Validation Rule to make Lookup Field Required

I am trying to create a validation rule that requires the lookup field be filled in.  I have tried ISNULL ="" LEN=0 to no avail. 

 

Anyone have any ideas on what I am doing wrong?

Best Answer chosen by Admin (Salesforce Developers) 
rockchick322004rockchick322004
ISNULL() does not work with Text fields because they are blank, not null.  Lookup fields are considered text fields in the system.  So, the way to check is as the prev comment suggests, by checking for blank:  field = ""

All Answers

hhuiehhuie

We have it as

 

field = ""

 

and that has worked for us

rockchick322004rockchick322004
ISNULL() does not work with Text fields because they are blank, not null.  Lookup fields are considered text fields in the system.  So, the way to check is as the prev comment suggests, by checking for blank:  field = ""
This was selected as the best answer