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
Rasmus SikkRasmus Sikk 

Need more than 10 rows of lookup filter criterias.

Hello!

I have 2 objects lets say CustomB__c and CustomA__c. Both these records have same record types names (CustomB__c has types A,B,C.., and CustomA__c has types A,B,C..).
I have lookup field on CustomA__c TO CustomB__c, and i need to show only the records that are same record types in my lookup. 

What I have tried:
1) Check CustomB__c record type and then check CustomA__c Record type and if they both match that is the solution. Problem here, is that i have 7 record types and i need total of 14 criteria fields for that, Salesfroce only give me 10.
2) I tried to create a formula field on CustomA__c to get record type name, problem here is, you can't use formula fields in lookup filters.

Anybody has ideas or faced the problem?

Thanks in advance!

NagendraNagendra (Salesforce Developers) 
Hi Rasmus,

Search options and functionality can differ a bit depending on whether you're in Classic or LEX. That having been said, the issue you're encountering is because you're not including a field along with the object when specifying the record type in your filter criteria.

Your filter criteria should look like the following:
Contract Name: Contract Record Type equals value My Record Type Name
You may find Lookup Filter https://help.salesforce.com/articleView?id=fields_lookup_filters_examples.htm&type=5 Examples in the Salesforce Help a useful resource to look at when writing your filter criteria.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra