1

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

What I have tried:

1) Check Contract record type name and then check CustomA__c Record type NAME 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.

Example:

Contract: Contract Record Type equals FOO
CustomA: Record Type: Name equals FOO

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.

Also what is wierd to me, is that i can't reference record type name in lookup filter for standard object. e.g: Contract: Record Type: Name, i can only do Contract: Contract Record Type which is recordTypeId standard field and i cant match by that value.

Anybody has ideas or faced the problem?

Thanks in advance!

1

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 Examples in the Salesforce Help a useful resource to look at when writing your filter criteria.

  • I solved the issue. I did create a picklist on Contract record and used formula to populate a default value based on record type $RecordType.name. And then i compared this picklist value to my custom object record types. Also i did make the picklist read-only on page layout. Works fine. – RSICK May 5 '18 at 15:12

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.